Important Changes
-
feat(v10/nextjs): Add a tunnel route handler that sends only the event payload to Sentry (#25559)
The
tunnelRouteoption can now send events through a route handler in your app. The handler forwards only the event payload to Sentry, and no request headers. To use it, add this file next to yourtunnelRouteoption:// app/sentry-tunnel/route.ts (or src/app/sentry-tunnel/route.ts) export { POST } from '@sentry/nextjs/tunnel';
The handler accepts events for the DSN of your server SDK. To accept other DSNs, use
createSentryTunnelRoute({ allowedDsns })from the same import. Without the file, the tunnel route works as before.With the handler, tunnel requests go through your middleware. If your middleware blocks unauthenticated requests, exclude the tunnel route in its
matcher.Also, the server no longer sends spans of tunnel requests when span streaming is on, because these spans only show the SDK's own traffic.
-
feat(v10/nextjs): Send tunnel route requests with
credentials: 'omit'(#25561)With
tunnelRouteand no tunnel route handler,@sentry/nextjsnow sends events from the browser withcredentials: 'omit', because the tunnel route does not need cookies.
If a layer in front of your app checks cookies before it lets requests through (for example Vercel Deployment Protection), you can send them again in your browserSentry.initcall:// instrumentation-client.ts Sentry.init({ transportOptions: { fetchOptions: { credentials: 'same-origin' } }, });
-
fix(v10/deps)!: Limit
@opentelemetry/apito<1.10.0and the OpenTelemetry SDK to<3.0.0(#25715)Breaking change
If your app uses
@opentelemetry/api1.10.0 or OpenTelemetry SDK v3 together with v10 of the Sentry SDK, you must stay on@opentelemetry/apibelow 1.10.0 and OpenTelemetry SDK v2, or upgrade to v11.@opentelemetry/api1.10.0 only works with OpenTelemetry SDK v3 (@opentelemetry/core3.x,@opentelemetry/instrumentation0.300.x). The SDK v2 packages that v10 uses only support@opentelemetry/apibelow 1.10.0, and SDK v3 needs Node.js 22.15.0 or newer, while v10 supports Node.js 18 and newer. For this reason, v10 now limits@opentelemetry/apito<1.10.0, and the@opentelemetry/instrumentationand@opentelemetry/exporter-trace-otlp-httppeer dependencies of@sentry/node-coreto<0.300.0.If your app depends on
@opentelemetry/apidirectly, use a version below 1.10.0 (for example~1.9.1). With 1.10.0, your app and the Sentry SDK use different copies of the API, and the OpenTelemetry calls of your app do not see the tracer provider of the Sentry SDK.To use
@opentelemetry/api1.10.0 and OpenTelemetry SDK v3, upgrade to v11 of the Sentry SDK. For the upgrade steps, see the migration guide.
Other Changes
- feat(v10/core): Limit the body size of tunnel requests (#25560)
- fix(v10/astro): Upload source maps of Astro 7's prerender build (#25426)
- fix(v10/aws-serverless): End the
function.awsspan when a callback-style handler calls back (#25693) - fix(v10/browser): Apply
urlQueryParamsto event URLs, static span names and LCP URLs (#25297) - fix(v10/browser): Apply
urlQueryParamsto the Referer header (#25425) - fix(v10/browser): Skip profiling for unsampled active root spans (#25502)
- fix(v10/build): Make CJS re-exports visible to Node ESM imports (#25690)
- fix(v10/bundler-plugins): Check
globalThisbeforeglobalin the injected snippet (#25507) - fix(v10/bundler-plugins): Escape JSON in generated injection code (#25298)
- fix(v10/bundler-plugins): Inject the release only into chunks that load at startup (#25695)
- fix(v10/cloudflare): auto-instrument a re-exported default export (#25407)
- fix(v10/cloudflare): auto-instrument when wrangler
mainis a package (#25430) - fix(v10/cloudflare): Bind a default re-export with
varin the Vite transform (#25733) - fix(v10/cloudflare): keep default exports intact when auto-instrumenting (#25732)
- fix(v10/core): Don't mark http client spans as errors when the caller aborts (#25431)
- fix(v10/core): Record span outcomes for spans dropped when building a transaction (#25294)
- fix(v10/core): Stop treating previous_response_id as the OpenAI conversation id (#25432)
- fix(v10/hono): Expose runtime-specific SDK options (#25299)
- fix(v10/nextjs): Apply top-level
bundleSizeOptimizationsto webpack and Turbopack builds (#25261) - fix(v10/nextjs): Filter query parameters in request error context (#25433)
- fix(v10/nextjs): Only inject applicationKey metadata into browser bundles (#25567)
- fix(v10/nitro): Use forward slashes for resolved plugin paths on Windows (#25692)
- fix(v10/node): Don't mark fetch spans as errors when the caller aborts (#25273)
- fix(v10/node): Only read JavaScript and TypeScript source files in ContextLines (#25699)
- fix(v10/node): Read module versions from the isolated layouts of pnpm and Bun (#25698)
- fix(v10/nuxt): Delete public source maps before Nitro lists its public assets (#25284)
- fix(v10/nuxt): Keep sourcesContent in Nuxt 5 server source maps (#25499)
- fix(v10/nuxt): Skip 3xx/4xx Nuxt errors in the vue:error hook (#25427)
- fix(v10/react): Don't crash ErrorBoundary when
error.causeis not an Error (#25691) - fix(v10/react): Match React Router navigations against root routes only (#25694)
- fix(v10/react-router): Respect custom default integrations (#25434)
- fix(v10/remix): Respect custom default integrations (#25435)
- fix(v10/replay): Apply attribute masking to breadcrumb messages (#25697)
- fix(v10/server-utils): avoid quadratic SQL summary regex backtracking (#25257)
- fix(v10/server-utils): End Express layer spans when the client aborts (#25256)
- fix(v10/sveltekit): add op and origin to Kit's
sveltekit.endpointspan (#25429) - fix(v10/tanstackstart-react): Keep parametrized route names in Nitro 3 builds (#25316)
- fix(v10/tanstackstart-react): Rewrite source paths of split route modules (#25428)
Internal Changes
- ci(v10): Assign Junior backport PRs to the original author (#25529)
- ci(v10): Cache Playwright browsers on v10 (#25720)
- test(v10): Skip Vercel AI OTel multi-step test on Node 26.12+ (#25443)
- test(v10/cloudflare): Deflake flush-timeout Workflow test (#25182)
- test(v10/e2e): Pull Supabase images from GHCR (#25719)
- test(v10/e2e): Update TanStack Start build tooling (#25436)
- test(v10/e2e): Use Node 22.23.4 in E2E test apps (#25687)
- test(v10/sveltekit): Pin rollup to 4.64.5 (#25440)
Bundle size 📦
| Path | Size |
|---|---|
| @sentry/browser | 27.62 KB |
| @sentry/browser - with treeshaking flags | 26.11 KB |
| @sentry/browser (incl. Tracing) | 46.19 KB |
| @sentry/browser (incl. Tracing + Span Streaming) | 47.95 KB |
| @sentry/browser (incl. Tracing, Profiling) | 50.87 KB |
| @sentry/browser (incl. Tracing, Replay) | 84.72 KB |
| @sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 74.59 KB |
| @sentry/browser (incl. Tracing, Replay with Canvas) | 89.32 KB |
| @sentry/browser (incl. Tracing, Replay, Feedback) | 101.64 KB |
| @sentry/browser (incl. Feedback) | 44.39 KB |
| @sentry/browser (incl. sendFeedback) | 32.31 KB |
| @sentry/browser (incl. FeedbackAsync) | 37.31 KB |
| @sentry/browser (incl. Metrics) | 28.69 KB |
| @sentry/browser (incl. Logs) | 28.92 KB |
| @sentry/browser (incl. Metrics & Logs) | 29.59 KB |
| @sentry/react | 29.39 KB |
| @sentry/react (incl. Tracing) | 48.44 KB |
| @sentry/vue | 33.37 KB |
| @sentry/vue (incl. Tracing) | 48.51 KB |
| @sentry/svelte | 27.64 KB |
| CDN Bundle | 29.97 KB |
| CDN Bundle (incl. Tracing) | 48.1 KB |
| CDN Bundle (incl. Logs, Metrics) | 31.52 KB |
| CDN Bundle (incl. Tracing, Logs, Metrics) | 49.38 KB |
| CDN Bundle (incl. Replay, Logs, Metrics) | 70.07 KB |
| CDN Bundle (incl. Tracing, Replay) | 84.95 KB |
| CDN Bundle (incl. Tracing, Replay, Logs, Metrics) | 86.21 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) | 90.62 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) | 91.88 KB |
| CDN Bundle - uncompressed | 89.06 KB |
| CDN Bundle (incl. Tracing) - uncompressed | 144.98 KB |
| CDN Bundle (incl. Logs, Metrics) - uncompressed | 93.67 KB |
| CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed | 148.87 KB |
| CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed | 216.21 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed | 262.13 KB |
| CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed | 266.01 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 275.51 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed | 279.38 KB |
| @sentry/nextjs (client) | 51.03 KB |
| @sentry/sveltekit (client) | 46.63 KB |
| @sentry/core/server | 79.75 KB |
| @sentry/core/browser | 66.14 KB |
| @sentry/node-core | 62.59 KB |
| @sentry/node | 124.29 KB |
| @sentry/node (incl. diagnostics channel injection) | 167.45 KB |
| @sentry/node/import (ESM hook with diagnostics-channel injection) | 166 B |
| @sentry/node/light | 50.96 KB |
| @sentry/node - without tracing | 74.11 KB |
| @sentry/aws-serverless | 83.04 KB |
| @sentry/cloudflare (withSentry) - minified | 200.12 KB |
| @sentry/cloudflare (withSentry) | 493.36 KB |