feat(observability): privacy-safe @sentry/nextjs SDK setup - #1516
feat(observability): privacy-safe @sentry/nextjs SDK setup#1516BigSimmo wants to merge 3 commits into
Conversation
Install @sentry/nextjs with errors + tracing, gated behind optional DSN env vars so unconfigured deploys stay inert. Scrub request/user/breadcrumb payloads, tunnel client envelopes via /monitoring for CSP, and restore answer-path capture for server faults and generation fallback. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Record PR #1516 progress and the remaining DSN/MCP verification and production-secret steps for runtime error tracking. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Point the queue row at PR #1516 remaining DSN/MCP verification steps. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
BigSimmo
commented
Jul 31, 2026
Temporarily closing to preserve the serialized merge queue while #1510 completes its final exact-head UI shard. This PR will be reviewed in a later queue slot. |
BigSimmo
commented
Jul 31, 2026
@cursoragent Prep this closed PR for reopen. Leave it CLOSED. Do not merge, reopen, force-push, rebase, or arm auto-merge. Do only this, in order:
Treat closed-PR CI as stale until reopen. Do not run local test suites CI will cover unless needed to prove a specific fix. |
Closed-PR reopen prep is done. PR #1516 stays CLOSED (draft). No merge, reopen, force-push, rebase, or auto-merge. Snapshot → sync → review
Sync: Merged Findings fixed
Focused Sentry suites: 28/28 (only proof run for those fixes). No broad local suites. Tip hygiene / handoff
Residual / on reopen
|


Summary
@sentry/nextjsand wire the Next.js recommended first-error baseline (errors + tracing) across Node, Edge, and browser runtimes.SENTRY_DSN/NEXT_PUBLIC_SENTRY_DSN(no SDK import / no egress when unset)./monitoringso CSPconnect-src 'self'stays intact; do not enable Session Replay (DOM would capture clinical query text).>=500) failures andanswer_generation_fallback(the GEN-C1 blind spot), with redacted exception messages and operational context only.#028to the remaining DSN / MCP verification / Railway secret steps.RAG impact: no retrieval behaviour change — observability-only capture around existing answer/fallback paths; ranking, selection, and synthesis are unchanged.
Verification
tests/error-capture.test.ts,tests/sentry-client.test.ts,tests/instrumentation.test.ts— 28/28 passednpm run typecheck— cleannpx eslinton touched files — clean (--max-warnings 0)npm run formatnpm run check:knip— cleannpm run check:env-parity— OKnpm run docs:check-index— OKnpm run test— 4660 passed, 2 failed intests/codex-cloud-setup.test.ts(pre-existing origin-credentials environment issue; unrelated to Sentry)npm run verify:pr-local— dry-run selects runtime/lock/format/lint/typecheck/test/build/eval:rag:offline; full gate not re-run after the unit suiteRisk and rollout
SENTRY_DSN/NEXT_PUBLIC_SENTRY_DSN(immediate inert), or revert this PR.SENTRY_AUTH_TOKEN/ org / project are set in Railway/local secrets. Source-map upload requires build-timeSENTRY_AUTH_TOKEN.Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes