Epure
SDK

Next.js @sentry/nextjs on Epure (dual DSN verify)

@sentry/nextjs self-host

Pin @sentry/nextjs@7.120.0, set SENTRY_DSN and NEXT_PUBLIC_SENTRY_DSN to the same Epure project, zero sample rates, Verify client/server/edge.

On this pageShow
  1. Install and pin
  2. Dual DSN env
  3. Three inits (7.x)
  4. What is captured
  5. Never-send table
  6. Verify path
  7. Who should use what
  8. Limitations
  9. Questions

Point official @sentry/nextjs@7.120.0 at Epure with both SENTRY_DSN and NEXT_PUBLIC_SENTRY_DSN on the same project. Init client, server, and edge; leave traces, profiles, and replay sample rates at 0. Confirm with Verify: 202 Accepted plus an Issues row after the env chip matches.

You already ship a Next.js App Router app on official Sentry SDKs and want exception Issues on a two-container self-host (Rust binary + PostgreSQL 16) without running full Sentry self-host for replay and APM. This how-to is the Next.js path: dual DSN env, three inits, CORS, then Verify.

Unique wedge: Next.js docs require both DSN env vars for one Epure project; client bundles cannot read SENTRY_DSN. Bias disclosed: Epure first-party docs are the source of truth for Epure behavior.

Primary how-to: Next.js. Acceptance: Verify. Pin/init: Quickstart. Host: Installation. CORS: Configuration. Maps: Source maps. Sibling: Sentry SDK compatible, Sourcemaps self-hosted verify, Epure vs Sentry.

Install and pin

Install the documented line: npm install @sentry/nextjs@7.120.0. Pin 7.120.0 for the same line Epure docs exercise. Newer majors may work; on v8+ move client init to instrumentation-client.ts, set enableTracing: false when the option exists, keep sample rates at 0, and confirm with Verify.

Dual DSN env

Client bundles cannot read SENTRY_DSN. Set both env vars to the same Epure project DSN or hydration and client throws never leave the tab.

Next.js DSN env vars (Next.js docs)

SENTRY_DSN

Rule
Server/edge; same project UUID as public

NEXT_PUBLIC_SENTRY_DSN

Rule
Client bundle; required for browser throws

Missing NEXT_PUBLIC_*

Rule
Client throws stay in the tab
DimensionRule
SENTRY_DSNServer/edge; same project UUID as public
NEXT_PUBLIC_SENTRY_DSNClient bundle; required for browser throws
Missing NEXT_PUBLIC_*Client throws stay in the tab

Example shape: SENTRY_DSN=http://YOUR_PUBLIC_KEY@localhost:8080/YOUR_PROJECT_ID and the same value in NEXT_PUBLIC_SENTRY_DSN.

Three inits (7.x)

Sentry JS 7.x uses three config files at the app root. Call Sentry.init in each. Sample rates for traces, profiles, and replay stay at 0 because those item types are discarded on Epure ingest.

Client example (sentry.client.config.ts): dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, environment: "local", release: "my-app@1.0.0", tracesSampleRate: 0, profilesSampleRate: 0, replaysSessionSampleRate: 0, replaysOnErrorSampleRate: 0. Mirror server and edge with the same project DSN. Wrap next.config with withSentryConfig when you upload maps for the same release string.

What is captured

Exceptions that reach the official Next.js handlers are captured. Transactions, replay, and profiles are discarded.

Capture surfaces (Next.js docs)

Client

What lands
Hydration mismatches, browser-only throws

Server

What lands
RSC, server actions, route handlers

Edge

What lands
Middleware and edge routes
DimensionWhat lands
ClientHydration mismatches, browser-only throws
ServerRSC, server actions, route handlers
EdgeMiddleware and edge routes

Handled errors: Sentry.captureException(error) inside your catch, then rethrow if needed. App Router and Server Component errors land when they reach the official handlers; confirm with Verify. Do not invent handler internals beyond that docs wording.

Never-send table

When Next.js never sends, use the docs symptom table before changing host shape.

Why Next.js never sends (Next.js docs)

Client throws missing

What to do
Set NEXT_PUBLIC_SENTRY_DSN (same project as SENTRY_DSN)

Failed OPTIONS from browser

What to do
Add app origin to EPURE_CORS_ORIGINS; recreate epure

401 / 403

What to do
Recopy DSN; revoked keys fail closed

202, empty Issues

What to do
Match env filter to environment: "local"
DimensionWhat to do
Client throws missingSet NEXT_PUBLIC_SENTRY_DSN (same project as SENTRY_DSN)
Failed OPTIONS from browserAdd app origin to EPURE_CORS_ORIGINS; recreate epure
401 / 403Recopy DSN; revoked keys fail closed
202, empty IssuesMatch env filter to environment: "local"

Verify path

Send Sentry.captureException(new Error("Epure verify test")). Expect 202 Accepted plus { "id": "<uuid>" }, then an unresolved Issues row. Open the project that owns the DSN and match the environment chip to Sentry.init. Optional: upload JS/TS .map files for the same release (Source maps, Sourcemaps self-hosted verify).

Who should use what

Use this guide for a full Next.js app on Epure with official @sentry/nextjs. Use Browser + Node guides when you have a separate Vite SPA plus Express API. Stay on Sentry Cloud if session replay or APM is the daily debug loop.

Use this guide if

  • You run Next.js App Router and want client + server + edge exceptions on Epure.
  • You need the dual DSN env rule (SENTRY_DSN + NEXT_PUBLIC_SENTRY_DSN).
  • You will Confirm with Verify after zeroing sample rates.

Read something else if

Limitations

Epure is not 100% Sentry compatible. Session replay, APM tracing, and profiling are not Epure features. There is no @epure/* package. Demangle is JS/TS only. Stack is two Compose services: Rust binary + PostgreSQL 16 (postgres:16-alpine). Cloud is not live.

  • Epure is not 100% Sentry compatible.
  • Session replay, APM tracing, and profiling are not Epure features.
  • No @epure/* package; use official @sentry/nextjs@7.120.0.
  • Demangle is JS/TS .map only; no Symbolicator component.
  • Do not invent App Router / RSC stack internals beyond docs wording.
  • Cloud is not live.

Deep links: Next.js | Verify | Quickstart | Installation | Configuration | Source maps.

FAQ

Questions

Do I need both SENTRY_DSN and NEXT_PUBLIC_SENTRY_DSN?
Yes. Client bundles cannot read SENTRY_DSN. Set both to the same Epure project or hydration and client throws never leave the tab.
Which package should a full Next.js app use?
Use @sentry/nextjs@7.120.0 so client, server, and edge share one package. A separate Vite SPA plus Express API uses Browser and Node instead.
Are traces or replay stored on Epure?
No. Set traces, profiles, and replay sample rates to 0. Those item types are discarded on ingest. Exception events plus breadcrumbs stay.
Will App Router and Server Component errors land?
Yes for exceptions that reach the official Sentry Next.js handlers (client, server, and edge init). Only the DSN host is Epure. Confirm with Verify.
Why are client throws missing?
NEXT_PUBLIC_SENTRY_DSN is missing or points at a different project than SENTRY_DSN. Set both to the same Epure DSN.
How do I fix browser CORS failures?
Add the app origin to EPURE_CORS_ORIGINS (comma-separated), recreate the epure service, then retry. See Configuration and Troubleshooting.
Is Epure 100% Sentry compatible for Next.js?
No. Epure is exception-only. Replay, tracing, and profiling are not Epure features. Pin 7.120.0 for the documented line; confirm newer majors with Verify.