Skip to content

feat(nextjs)!: Auto-wire orchestrion build-time instrumentation - #22921

Open
chargome wants to merge 4 commits into
developfrom
cg/next-orchestrion-default
Open

feat(nextjs)!: Auto-wire orchestrion build-time instrumentation#22921
chargome wants to merge 4 commits into
developfrom
cg/next-orchestrion-default

Conversation

@chargome

@chargome chargome commented Jul 31, 2026

Copy link
Copy Markdown
Member

withSentryConfig now wires up the orchestrion code transform automatically for webpack and Turbopack server builds.

This flips the default: build-time instrumentation was previously opt-in behind _experimental.useDiagnosticsChannelInjection, which is removed. Opting out now goes through the shared buildTimeInstrumentation: false build option that the other meta-framework SDKs already use.

resolveBuildTimeInstrumentationOption keeps the feature off on Turbopack below Next.js 16, where the transform can't run and the packages dropped from serverExternalPackages would end up bundled and uninstrumented.

Also removes the _sentryUseDiagnosticsChannelInjection env marker, whose only reader was deleted in #22501.

closes #22779

@chargome chargome self-assigned this Jul 31, 2026
@chargome

Copy link
Copy Markdown
Member Author

bugbot run

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.91 kB - -
@sentry/browser - with treeshaking flags 28.11 kB - -
@sentry/browser (incl. Tracing) 47.38 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.38 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.15 kB - -
@sentry/browser (incl. Tracing, Replay) 86.72 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.15 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.43 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 104.06 kB - -
@sentry/browser (incl. Feedback) 47.22 kB - -
@sentry/browser (incl. sendFeedback) 34.76 kB - -
@sentry/browser (incl. FeedbackAsync) 39.86 kB - -
@sentry/browser (incl. Metrics) 30.99 kB - -
@sentry/browser (incl. Logs) 31.22 kB - -
@sentry/browser (incl. Metrics & Logs) 31.89 kB - -
@sentry/react 31.73 kB - -
@sentry/react (incl. Tracing) 49.64 kB - -
@sentry/vue 34.98 kB - -
@sentry/vue (incl. Tracing) 49.36 kB - -
@sentry/svelte 29.94 kB - -
CDN Bundle 31.98 kB - -
CDN Bundle (incl. Tracing) 47.73 kB - -
CDN Bundle (incl. Logs, Metrics) 33.55 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.09 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.9 kB - -
CDN Bundle (incl. Tracing, Replay) 85.36 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.66 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.16 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.47 kB - -
CDN Bundle - uncompressed 95.49 kB - -
CDN Bundle (incl. Tracing) - uncompressed 143.25 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.2 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.23 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.96 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.51 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.47 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.17 kB - -
@sentry/nextjs (client) 52.21 kB - -
@sentry/sveltekit (client) 47.82 kB - -
@sentry/core/server 79.99 kB - -
@sentry/core/browser 51.92 kB - -
@sentry/node 121.61 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 85.15 kB - -
@sentry/aws-serverless 93.41 kB - -
@sentry/cloudflare (withSentry) - minified 199.12 kB - -
@sentry/cloudflare (withSentry) 490.4 kB - -

View base workflow run

@chargome

Copy link
Copy Markdown
Member Author

bugbot run

Comment thread packages/nextjs/test/config/withSentryConfig.test.ts Outdated
@chargome

Copy link
Copy Markdown
Member Author

bugbot run 📿

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d71fdbe. Configure here.

@chargome
chargome marked this pull request as ready for review July 31, 2026 16:34
@chargome
chargome requested a review from a team as a code owner July 31, 2026 16:34
@chargome
chargome requested review from nicohrubec and s1gr1d and removed request for a team July 31, 2026 16:34

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

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.

Nextjs: auto wire with new option + flip default

2 participants