← All platforms

Connect error tracking

A middleware chain can hide where a request went wrong. The Sentry Connect integration sends the exception and its backtrace to your Telebugs server.

~/hoofnotes  npm install @sentry/node
~/hoofnotes  nvim instrument.mjs app.mjs
import * as Sentry from "@sentry/node";
Sentry.init({
// Copy the complete Telebugs DSN, key and path included.
dsn: "YOUR_TELEBUGS_DSN",
});
import connect from "connect";
import * as Sentry from "@sentry/node";
import { routes } from "./hoofnotes/routes.mjs";
const app = connect();
app.use(routes);
Sentry.setupConnectErrorHandler(app);
app.listen(3000);
~/hoofnotes  node --import ./instrument.mjs app.mjs

Space pauses or resumes. R replays. Escape shows the complete setup.

Hang on, I already use Sentry

Keep @sentry/node and change its destination to your Telebugs DSN. Your error reports stay on your server. You don’t need a Sentry account.

Another piece of middleware?

Yes. The Connect error handler fits into your middleware stack. Errors passed down that stack can become reports in Telebugs instead of disappearing behind a 500 response.

And the browser side?

Use the browser SDK for frontend errors. Your server and browser reports can live in Telebugs together without sharing the same SDK setup.