Epure
ExpressExpress

Error tracking for Express with @sentry/node

Use this page when Express should report errors through request and error middleware. Use /integrations/node for Fastify, Nest, Koa, Hono, and workers. Install @sentry/node@7.120.0. Call Sentry.init before routes. CI live smoke is that pin.

Host up → install SDK → paste DSN (project id from Settings → SDK connection) → confirm a 202.

Start here

From zero, or from Sentry.

Same finish line: @sentry/node pointing at your Epure DSN, first issue in the list.

Fresh install

Never used Sentry? Start here.

  • 1. Compose up on your host
  • 2. Install @sentry/node
  • 3. Init with the Epure DSN and verify

Already on Sentry

Keep the SDK. Change the DSN.

  • 1. Create an Epure project and copy the DSN
  • 2. Replace only the dsn string in init
  • 3. Set traces/replay/profile rates to 0
The fit

Epure is the error tracker for Express.

Install @sentry/node once. Point the DSN at Epure. No Sentry Cloud account required. Only the open SDK client.

  • Official SDK, no proprietary agent

    Install @sentry/node (or keep it if you already have Sentry). Point dsn at Epure.

  • Self-host without a broker fleet

    Postgres holds issues and events. No Kafka or Redis in the OSS compose. Self-host is a $0 software license; you still run the host. Cloud Pro is $24 and Plus is $79.

  • Issues you can finish

    Grouping, releases, alerts, and soft-sampling on spikes. Triage without a seat tax.

What Express middleware sees

Route errors that never hit your logger as one issue.

v7 handlers sit around the router. Init runs before any route. The Node page stays SDK init for other servers.

  • Express

    requestHandler

    Sentry.Handlers.requestHandler() runs first and attaches request data used as context.

  • errorHandler

    errorHandler

    Sentry.Handlers.errorHandler() sits after routes and captures errors passed to next(err).

  • Init before routes

    Init before routes

    Call Sentry.init, build the app, then register requestHandler, routes, and errorHandler in that order.

  • Handled catch

    Handled catch

    A catch that responds 500 without next(err) needs captureException. The error handler never sees it.

  • Flush on exit

    Flush on exit

    Short processes should await Sentry.close(2000) before exit so the last envelope leaves.

Install path

Host. SDK. First issue.

New to Sentry or already on it. Same three moves. Official SDK in, DSN pointed at Epure, one test throw.

  • Run Epure

    docker compose up locally (optional `.env` for ports). Register, name a project, copy the DSN from setup or Settings → SDK connection. Self-host is the path that ships today.

  • Install @sentry/node

    Add the official Sentry SDK from your package manager. Epure speaks the Sentry wire, so there is no @epure/* client.

  • Init and verify

    Call Sentry.init with the Epure DSN. Throw once (or captureException). Confirm 202 and an issue in the list.

Wire path

Init first. Handlers around the routes.

@sentry/node 7.120.0 uses Sentry.Handlers.requestHandler and Sentry.Handlers.errorHandler. Sample rates stay at 0.

  • Install @sentry/node

    Official Sentry client from the package registry. No @epure/* SDK.

  • Point dsn at Epure

    Paste the project DSN from Settings. Fresh install and Sentry migrants use the same field.

  • Disable discarded lines

    Set traces, replay, and profile sample rates to 0. Epure stores exceptions only.

1npm install @sentry/node@7.120.0
Why Epure

Install @sentry/node. Point the DSN. Verify.

Keep the official SDK. Change only the host.

  • Official SDK, no proprietary agent

    Install @sentry/node (or keep it if you already have Sentry). Point dsn at Epure.

  • Self-host without a broker fleet

    Postgres holds issues and events. No Kafka or Redis in the OSS compose. Self-host is a $0 software license; you still run the host. Cloud Pro is $24 and Plus is $79.

  • Issues you can finish

    Grouping, releases, alerts, and soft-sampling on spikes. Triage without a seat tax.

  • Honest scope

    Exceptions and stacks. We skip replay, profiling, and transaction APM, and never claim 100% compatibility.

  • Readable JS/TS stacks

    Upload sourcemaps via release files. Local frames stay useful after minify.

  • You own the data path

    Self-host keeps stack traces on your Postgres. Cloud soft-samples instead of surprise invoices.

FAQ

Before you paste the Express DSN.

Do I need an existing Sentry Cloud account?
No. Install @sentry/node from the package registry, create an Epure project, paste the DSN, and capture. You need their open SDK client, never their SaaS. Quickstart.
I already use @sentry/node. Do I rewrite?
No. Leave the SDK. Change only the dsn to your Epure host. Set traces/replay/profile sample rates to 0 so you don’t ship volume Epure discards. Self-host install if you still need compose.
What about transactions, replay, and profiling?
Epure is exception tracking. Transactions are discarded. Replay and profiling items are ignored. Disable those sample rates in init.
How long until I see the first Express issue?
With Docker warm and a DSN in env, most people land a 202 and an issue the same sitting. Persistence is async, so under normal load an issue appears in well under a second.
Which wire path does Express use?
Node envelope POST /api/{project_id}/envelope/. CI live smoke is @sentry/node 7.120.0. This page uses Sentry.Handlers.requestHandler and Sentry.Handlers.errorHandler from that v7 pin. Call Sentry.init before routes.
How do I verify the first Express issue?
Hit a route that calls next(err) with the error handler mounted after it. Expect HTTP 202, then an issue row. Verify. A rejected DSN: Invalid DSN. A 202 with an empty list: Events not showing. Epure stores exceptions. No session replay, distributed tracing, profiling, or logs.

Point Express at Epure tonight.

Compose up. Install @sentry/node. Mount the handlers.

Apache 2.0 · official Sentry SDK · swap DSN