Express
Install the SDK, register the request handler before your routes, and the error handler after them.
npm install insider-node express
import express from "express";
import * as insider from "insider-node";
import {
ExpressIntegration,
expressRequestHandler,
expressErrorHandler,
} from "insider-node/express";
insider.init({
dsn: process.env.INSIDER_DSN,
environment: "production",
release: "1.2.3",
integrations: [new ExpressIntegration()],
});
const app = express();
app.use(express.json());
app.use(expressRequestHandler());
app.get("/orders", (req, res) => res.json({ ok: true }));
app.use(expressErrorHandler());
app.listen(3000);
What gets beamed
Each request emits one flat footprint. Logs and the unhandled exception from that request stay on it. Set enableLogs: true to buffer console output into system_logs. Bodies stay off unless sendDefaultPii is true.