Uh oh!
There was an error while loading. Please reload this page.
feat(node): Add build-time opt-out for runtime channel injection - #23475
Conversation
Uh oh!
There was an error while loading. Please reload this page.
size-limit report 📦
|
68993db to
c6d9d7fComparec6d9d7f to
1d27eb4CompareUh oh!
There was an error while loading. Please reload this page.
1d27eb4 to
e670b7cComparee670b7c to
40ae0c4Compare40ae0c4 to
8ff1633CompareThere was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8ff1633. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
8ff1633 to
5a399f9Compare5a399f9 to
dac4c3aCompare
isaacs
left a comment
There was a problem hiding this comment.
Two small fixes that I think are worth doing before landing, but this looks good otherwise.
| * | ||
| * @default false | ||
| */ | ||
| excludeChannelInjection?: boolean; |
There was a problem hiding this comment.
Should this also be added to the BundleSizeOptimizationsOptions in packages/core/src/build-time-plugins/buildTimeOptionsBase.ts, so that it can be picked up on the bundleSizeOptimizations field of BuildTimeOptionsBase? Eg, that's what packages/nuxt/src/common/types.ts pulls its options from.
There was a problem hiding this comment.
ah, you are right. this is a bit weird and maybe we can combine these together at some point...
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Introduce a `__SENTRY_CHANNEL_INJECTION__` treeshaking flag (mirroring `__SENTRY_TRACING__`) that removes the runtime diagnostics-channel injection when text-replaced with `false`, and expose it through the bundler plugins' `bundleSizeOptimizations.excludeChannelInjection`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: isaacs <i@izs.me>
f1c25ae to
00566b9Compare
isaacs
left a comment
There was a problem hiding this comment.
The blocking concern is addressed, LGTM.
Uh oh!
There was an error while loading. Please reload this page.

Stacked on #23473.
Adds a build-time opt-out for the Node SDK's runtime diagnostics-channel injection, complementing the runtime
enableRuntimeChannelInjectionoption from the base PR.__SENTRY_CHANNEL_INJECTION__treeshaking flag, mirroring__SENTRY_TRACING__: when a bundler text-replaces it withfalse, theregisterDiagnosticsChannelInjection()/detectOrchestrionSetup()block ininitis dropped, and its transitive orchestrion-register code tree-shakes away.bundleSizeOptimizations.excludeChannelInjection, which maps to__SENTRY_CHANNEL_INJECTION__ = falsevia the same mechanism asexcludeTracing.(typeof __SENTRY_CHANNEL_INJECTION__ === 'undefined' || __SENTRY_CHANNEL_INJECTION__) && options.enableRuntimeChannelInjection !== false.🤖 Generated with Claude Code