Node.js guide
Node.js error monitoring
Errilo receives errors from your Node.js and TypeScript services through the official @sentry/node SDK: APIs, workers, scripts. Already on Sentry? Only the DSN changes.
Errilo is in development. This guide describes the setup our compatibility suite tests today; the private beta opens in summer 2027.
Setup
Initialize the SDK in its own file, loaded before the rest of your app:
import * as Sentry from "@sentry/node";
Sentry.init({
dsn: process.env.SENTRY_DSN,
});SENTRY_DSN=https://<key>@ingest.errilo.com/<project> node --import ./instrument.mjs server.mjsIn CommonJS, require("./instrument.js") on the first line of your entry file does the same.
Reporting an error yourself
For an error you handle but still want to see in Errilo:
import * as Sentry from "@sentry/node";
try {
await chargeCustomer(order);
} catch (error) {
Sentry.captureException(error); // sent to Errilo
throw error;
}In a short-lived script or a serverless function, call await Sentry.flush() before the process exits, so pending events are sent.
Readable stack traces
In development: source map upload and readable stack traces will be ready for the private beta.
sentry-cli or a Sentry bundler plugin uploads your source maps at build time. Errilo implements the same upload API: give the plugin Errilo’s address and an Errilo token, and stack traces point to your TypeScript source instead of the compiled code. See the migration guide.
Tested versions
| Major version | Tested version |
|---|---|
| v9 | @sentry/node@9.47.2 |
| v10 | @sentry/node@10.78.0 |
| v11 | @sentry/node@11.12.0 |
Our suite runs each version in its own Node.js process, captures an error, flushes it and checks it in Errilo: message, level, platform and SDK. Express, Fastify and NestJS also use @sentry/node; their error handlers aren’t covered by our suite yet.