Sentry error monitoring (errors-only) - #33
Merged
Merged
Conversation
Client stays at the ~30 KB errors-only floor: no tracing, no replay, enableLogs off. onRequestError covers server components, actions, handlers and middleware; logQueryError captures the caught-and-handled paths that never throw. Tunnel route is a fixed string and excluded from the auth middleware matcher — under Turbopack the SDK doesn't skip it by itself. No-ops until NEXT_PUBLIC_SENTRY_DSN is set.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Review pass: the generic unwrap() rethrow is ignored server-side (already captured with context in logQueryError), boundaries skip digest-bearing errors (captured server-side, redacted on the client), and the Sentry env vars join .env.example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires @sentry/nextjs v10.71 in the current Next 16 shape:
src/instrumentation.tswithonRequestError(auto-captures throws in server components, server actions, route handlers, middleware),src/instrumentation-client.ts, and aglobal-error.tsxso root-layout crashes stop being invisible.logQueryErrornow also reports to Sentry — that one edit covers every caught-and-handled{ ok: false }mutation path.Deliberate choices: errors-only client (~30 KB gz — no tracing/replay/logs),
sendDefaultPii: falseeverywhere (LGPD; user association can come later assetUser({ id })only), fixedtunnelRoute: '/sentry-tunnel'excluded from the middleware matcher — Turbopack builds don't auto-skip it and the Supabase middleware would eat the POSTs.Everything no-ops until
NEXT_PUBLIC_SENTRY_DSN(+SENTRY_ORG/SENTRY_PROJECT/SENTRY_AUTH_TOKENfor source maps) land in Vercel. Prod build +next startsmoke-tested locally against the known Turbopack/OTel crash (sentry-javascript #19367) — clean.