feat(node): Add build-time opt-out for runtime channel injection - #23475
Open
mydea wants to merge 1 commit into
Open
feat(node): Add build-time opt-out for runtime channel injection#23475mydea wants to merge 1 commit into
mydea wants to merge 1 commit into
Conversation
Contributor
size-limit report 📦
|
mydea
force-pushed
the
fn/channel-injection-build-flag
branch
from
August 21, 2026 10:04
68993db to
c6d9d7f
Compare
mydea
force-pushed
the
fn/channel-injection-build-flag
branch
from
August 21, 2026 11:02
c6d9d7f to
1d27eb4
Compare
mydea
force-pushed
the
fn/channel-injection-build-flag
branch
from
August 24, 2026 07:51
1d27eb4 to
e670b7c
Compare
mydea
force-pushed
the
fn/channel-injection-build-flag
branch
from
August 24, 2026 09:04
e670b7c to
40ae0c4
Compare
mydea
marked this pull request as ready for review
August 24, 2026 09:24
mydea
requested review from
msonnb and
stephanie-anderson
and removed request for
a team
August 24, 2026 09:24
mydea
force-pushed
the
fn/channel-injection-build-flag
branch
from
August 24, 2026 11:06
40ae0c4 to
8ff1633
Compare
There 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.
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>
mydea
force-pushed
the
fn/channel-injection-build-flag
branch
from
August 24, 2026 11:24
8ff1633 to
5a399f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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