Problem / motivation
Sentry causes severe dev-server slowdowns. While diagnosing #109 (GitHub OAuth callback consistently hitting a 10s UND_ERR_CONNECT_TIMEOUT to github.com:443), removing withSentryConfig from `apps/web/next.config.ts` and skipping `Sentry.init` in `instrumentation.ts` fully resolved the OAuth latency and improved overall dev application performance noticeably. The same Node binary, container, and IPs that hang under Sentry are fast (≤70ms) when Sentry is absent.
The exact mechanism inside @sentry/nextjs 10.52 / its transitive OpenTelemetry+IITM stack is unconfirmed, but the impact on developer experience is large enough that a clean removal is preferable to working around it.
Sentry is currently used in:
- `apps/web/next.config.ts` (`withSentryConfig`)
- `apps/web/instrumentation.ts`
- `apps/web/sentry.{server,client,edge}.config.ts`
- `apps/api/src/index.ts` (Sentry node SDK init)
Proposed solution
Remove `@sentry/nextjs` and `@sentry/node` from the project entirely:
- Drop the deps from `apps/web/package.json` and `apps/api/package.json`.
- Delete the four `sentry.*.config.ts` files in `apps/web`.
- Strip Sentry init from `apps/web/instrumentation.ts` and `apps/api/src/index.ts`.
- Remove `withSentryConfig` wrapper in `apps/web/next.config.ts`.
- Drop `SENTRY_SPOTLIGHT` / `NEXT_PUBLIC_SENTRY_SPOTLIGHT` from `.env.local` and any docs that reference them.
- Remove the `spotlight` dev-mode wiring (port forwarding, etc.) if any remains.
Should be a single PR. Do NOT replace with another observability tool in the same change — see the companion investigation ticket.
Alternatives considered
- Gating Sentry behind `NODE_ENV !== 'development'`: keeps Sentry in prod but skips it in dev. Solves the immediate dev-perf problem but leaves the project carrying a dependency that has shown opaque performance pathologies. Defer to the alternatives investigation before re-adding any error-tracking SDK.
- Tuning Sentry options (`autoInstrumentServerFunctions: false`, etc.): didn't try exhaustively because the team prefers a clean slate and a deliberate replacement decision.
Affected area
apps/web
Additional context
Problem / motivation
Sentry causes severe dev-server slowdowns. While diagnosing #109 (GitHub OAuth callback consistently hitting a 10s
UND_ERR_CONNECT_TIMEOUTtogithub.com:443), removingwithSentryConfigfrom `apps/web/next.config.ts` and skipping `Sentry.init` in `instrumentation.ts` fully resolved the OAuth latency and improved overall dev application performance noticeably. The same Node binary, container, and IPs that hang under Sentry are fast (≤70ms) when Sentry is absent.The exact mechanism inside @sentry/nextjs 10.52 / its transitive OpenTelemetry+IITM stack is unconfirmed, but the impact on developer experience is large enough that a clean removal is preferable to working around it.
Sentry is currently used in:
Proposed solution
Remove `@sentry/nextjs` and `@sentry/node` from the project entirely:
Should be a single PR. Do NOT replace with another observability tool in the same change — see the companion investigation ticket.
Alternatives considered
Affected area
apps/web
Additional context