Framework setup

Error monitoring for Express

Set up Sentry-compatible error monitoring in your Express app with Vakt360. Install the SDK, point it at your DSN, and see grouped, symbolicated errors in minutes.

Framework setup · 4 min read

  1. Create a project and copy your DSN

    Sign up for Vakt360 and create a project for your app. Open the project's settings and copy its DSN. It tells the SDK where to send events, and it is safe to ship because it can only ingest, never read your account.

    text
    https://<your-key>@ingest.vakt360.com/<project>
  2. Install the SDK

    Vakt360 speaks the Sentry ingest protocol, so you use the standard Express Sentry SDK, with nothing Vakt360-specific to learn.

    bash
    npm install @sentry/node
  3. Initialise the SDK with your DSN

    Point the dsn at the value you copied above; that single line is the only Vakt360-specific change.

    js
    const Sentry = require("@sentry/node");
    Sentry.init({ dsn: "https://<your-key>@ingest.vakt360.com/<project>" });
    
    const express = require("express");
    const app = express();
    
    // ... your routes ...
    
    // Register the error handler after your routes, before any other error middleware.
    Sentry.setupExpressErrorHandler(app);
  4. Send a test error

    Trigger an error on purpose and confirm it appears in your Vakt360 issues within a few seconds, grouped and ready to triage.

    js
    app.get("/debug-sentry", () => {
      throw new Error("Vakt360 test error");
    });
  5. Turn on alerts and go further

    Add email, Slack or webhook alerts so a new issue reaches you once, not once per event. From here you can also add performance transactions, uptime and cron check-ins, and session replay, all from the same DSN.

Start monitoring on the free plan

100,000 events a month, no card required. Point your existing SDK at Vakt360 and see your first event in minutes.