Installation
Install the Rasputin Hono 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 Hono SDK to your app. Register
app.use(middleware)once, before other middleware and routes.npm install @rasputin-ai/hono - 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 { Hono } from 'hono'; import { RasputinInit } from '@rasputin-ai/hono'; const { client, middleware } = RasputinInit({ dsn: process.env.RASPUTIN_DSN!, projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!, release: process.env.RASPUTIN_RELEASE!, environment: 'production', }); const app = new Hono(); app.use(middleware); // Register before other middleware and routes. app.get('/health', (c) => c.text('ok')); - 4
That's it
Uncaught errors will report on a long-running Node or Bun process.
Set up the runtime recorder
