Installation
Install the Rasputin Node.js SDK on a long-running Node.js or Bun server. Set a release and create a client to capture production errors.
- 1
Install the package
Add the Node.js SDK to your app.
npm install @rasputin-ai/node - 2
Set your release
Pass a Git commit SHA as
How to set the release fieldrelease. On common hosts you can use the platform's existing variable instead of settingRASPUTIN_RELEASE. - 3
Create your client
Initialize Rasputin once when your app starts.
import { RasputinInit } from '@rasputin-ai/node'; const rasputin = RasputinInit({ dsn: process.env.RASPUTIN_DSN!, projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!, release: process.env.RASPUTIN_RELEASE!, environment: process.env.NODE_ENV ?? 'development', enabled: ['staging', 'production'].includes(process.env.NODE_ENV ?? 'development'), }); - 4
That's it
Uncaught errors will report on a long-running Node or Bun process. The runtime recorder is optional.
Optional: set up the runtime recorder
