Installation
Install the Rasputin Elysia 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 Elysia SDK to your app. The package also scopes HTTP when you register its plugin.
npm install @rasputin-ai/elysia - 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 { Elysia } from 'elysia'; import { RasputinInit } from '@rasputin-ai/elysia'; const { client, plugin } = 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'), }); const app = new Elysia().use(plugin); // If you use multiple plugins, register Rasputin as early as possible in the chain. - 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
