Installation
Install the Elysia SDK, set a release, and create the client. That is enough for error reporting.
- 1
Install the package
Add the Elysia SDK to your app. Elysia uses the same error-reporting core; HTTP executions are automatic when you add the recorder.
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
Rasputin is ready to capture errors from your app. The runtime recorder is optional and adds richer context to failures.
Optional: set up the runtime recorder
