Installation

Install the Node or Bun SDK, set a release, and create the client. That is enough for error reporting.

  1. 1

    Install the package

    Add the Node.js/Bun SDK to your app. Bun uses the same package.

    npm install @rasputin-ai/node

  2. 2

    Set your release

    Pass a Git commit SHA as release. On common hosts you can use the platform's existing variable instead of setting RASPUTIN_RELEASE.

    How to set the release field
  3. 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. 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