Skip to content

fix(v10/nextjs): Keep the Pages Router runtime out of App Router client bundles - #24223

Merged
chargome merged 1 commit into
v10from
chargome/fix/v10-nextjs-static-pages-router-split
Sep 9, 2026
Merged

fix(v10/nextjs): Keep the Pages Router runtime out of App Router client bundles#24223
chargome merged 1 commit into
v10from
chargome/fix/v10-nextjs-static-pages-router-split

Conversation

@chargome

@chargome chargome commented Sep 9, 2026

Copy link
Copy Markdown
Member

Backport of: #24188

Differences to the original PR

  • packages/nextjs/src/client/routing/pagesRouterNavigationInstrumentation.ts: uses v10's SEMANTIC_ATTRIBUTE_SENTRY_OP/SEMANTIC_ATTRIBUTE_SENTRY_SOURCE and the plain route/URL span name; v10 has no @sentry/conventions/op, SENTRY_SEGMENT_NAME_SOURCE, or span-streaming name fallback. The __BUILD_MANIFEST-typed globalObject moved here with the route matching code.
  • packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts: keeps v10's pageload code (browserPerformanceTimeOrigin start time, v10 attribute constants); only the navigation half and the next/router import were removed.
  • dev-packages/e2e-tests/test-applications/nextjs-16/tests/build-output.test.ts: new file on v10 containing only the bundle assertion; the absolute-path-imports test from develop depends on a @sentry-internal/test-utils helper that does not exist on v10.

@chargome chargome self-assigned this Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.76 kB added added
@sentry/browser - with treeshaking flags 26.2 kB added added
@sentry/browser (incl. Tracing) 46.62 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.41 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.38 kB added added
@sentry/browser (incl. Tracing, Replay) 85.88 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.5 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.61 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.25 kB added added
@sentry/browser (incl. Feedback) 44.94 kB added added
@sentry/browser (incl. sendFeedback) 32.56 kB added added
@sentry/browser (incl. FeedbackAsync) 37.69 kB added added
@sentry/browser (incl. Metrics) 28.85 kB added added
@sentry/browser (incl. Logs) 29.07 kB added added
@sentry/browser (incl. Metrics & Logs) 29.77 kB added added
@sentry/react 29.57 kB added added
@sentry/react (incl. Tracing) 48.88 kB added added
@sentry/vue 33.18 kB added added
@sentry/vue (incl. Tracing) 48.59 kB added added
@sentry/svelte 27.79 kB added added
CDN Bundle 30.15 kB added added
CDN Bundle (incl. Tracing) 48.58 kB added added
CDN Bundle (incl. Logs, Metrics) 31.73 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.88 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 71.02 kB added added
CDN Bundle (incl. Tracing, Replay) 86.1 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.41 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.9 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.18 kB added added
CDN Bundle - uncompressed 89.89 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.7 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.6 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.68 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.43 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 266 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.97 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.7 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.66 kB added added
@sentry/nextjs (client) 51.45 kB added added
@sentry/sveltekit (client) 47.04 kB added added
@sentry/core/server 80.8 kB added added
@sentry/core/browser 66.95 kB added added
@sentry/node-core 63.33 kB added added
@sentry/node 126.02 kB added added
@sentry/node (incl. diagnostics channel injection) 170.11 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B added added
@sentry/node/light 51.46 kB added added
@sentry/node - without tracing 75 kB added added
@sentry/aws-serverless 84.26 kB added added
@sentry/cloudflare (withSentry) - minified 202.71 kB added added
@sentry/cloudflare (withSentry) 499.12 kB added added

@chargome
chargome marked this pull request as ready for review September 9, 2026 08:39
@chargome
chargome requested a review from a team as a code owner September 9, 2026 08:39
@chargome
chargome requested review from mydea and nicohrubec and removed request for a team September 9, 2026 08:39
@chargome
chargome merged commit c89f6e6 into v10 Sep 9, 2026
83 checks passed
@chargome
chargome deleted the chargome/fix/v10-nextjs-static-pages-router-split branch September 9, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants