Commit efade0f
fix(web): enable Sentry tracing and restore client-side Sentry
Renames sentry.client.config.ts to instrumentation-client.ts, which
Next.js loads itself. The old file was only wired in by @sentry/nextjs'
webpack plugin, which never runs: next build defaults to Turbopack in
Next 16, and next.config.mjs defines a turbopack block, so Next's
"webpack config with no turbopack config" guard passes silently. Client
errors, replays and spans were therefore never reported in production.
Exports onRouterTransitionStart so App Router client-side navigations
are instrumented as spans; Next only reads that export from
instrumentation-client.ts.
Sets tracesSampleRate on client, server and edge. Tracing is off unless
this option is present at all, since hasSpansEnabled() checks for
non-nullish. Sampling every trace for now to get a read on span volume
before tuning the rate down.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent a1b71c3 commit efade0f
3 files changed
Lines changed: 14 additions & 0 deletions
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
0 commit comments