Repository navigation
fix(cloudflare): Do not add back channel integrations the user removed - #25585
Merged
isaacs merged 3 commits intoOct 26, 2026
Conversation
Contributor
size-limit report 📦Compared: d66dbfd (PR test merge using develop at ad71ef6) Against: ad71ef6 (develop) · base run #63604 ✅ Baseline matches: this diff contains only this PR's changes.
|
Member
Author
|
Bugbot run |
There was a problem hiding this comment.
✅ 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 abb4fe2. Configure here.
isaacs
marked this pull request as ready for review
October 21, 2026 00:44
isaacs
requested review from
JPeer264 and
mydea
and removed request for
a team
October 21, 2026 00:44
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 21, 2026 01:07
17f3007 to
1ec6d31
Compare
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 21, 2026 01:13
1ec6d31 to
5097841
Compare
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
4 times, most recently
from
October 21, 2026 14:16
f20e973 to
e725255
Compare
Contributor
Optional E2E testsAll optional checks were successful. 32 successful. See the run. Successful checks
|
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 21, 2026 16:45
e725255 to
f9f181b
Compare
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 21, 2026 16:59
f9f181b to
b7a2eb0
Compare
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 21, 2026 17:28
b7a2eb0 to
adf4a7b
Compare
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 21, 2026 18:27
adf4a7b to
e239a55
Compare
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 21, 2026 18:37
e239a55 to
ee5be05
Compare
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
2 times, most recently
from
October 22, 2026 15:37
1a01a04 to
25b2065
Compare
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
4 times, most recently
from
October 23, 2026 20:54
96ccc02 to
f0b2510
Compare
JPeer264
approved these changes
Oct 25, 2026
JPeer264
left a comment
Member
There was a problem hiding this comment.
LGTM, I would still vote to prefix the new option with _
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 26, 2026 15:59
f0b2510 to
9a7d759
Compare
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 26, 2026 16:12
9a7d759 to
4d7312d
Compare
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 26, 2026 16:23
4d7312d to
9764b52
Compare
Base automatically changed from
isaacschlueter/js-3973-cloudflare-export-channel-integrations
to
develop
October 26, 2026 18:17
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 26, 2026 18:17
9764b52 to
84563e6
Compare
The `@sentry/cloudflare/vite` plugin stores an integration factory for each instrumented package when the package first runs. At `init()`, the SDK adds the stored factories to the defaults. A package that runs after `init()`, for example a driver loaded with a dynamic `import()`, emits `orchestrion.module-injected`, and the SDK then called `client.addIntegration(factory())`. That handler did not check the user's options, so it ignored each way to opt out: an `integrations` function that filtered the integration out, `defaultIntegrations: false`, and a custom `defaultIntegrations` list. The user got the integration back. For the AI integrations, that can turn prompt and response capture back on. Whether it happened depended on module load order. The handler now applies the rules that `init()` applies to the defaults: - If the user set `defaultIntegrations`, the SDK defaults are off, so the handler adds nothing. - If `integrations` is a function, the handler passes the late integration through it with `getIntegrationsToSetup` and installs the result with the same name, if there is one. This calls the function again, once for each late module. If the function throws, the handler skips the integration, so the module load that emitted the event still works. - If `integrations` is an array, nothing changes. An array cannot remove a default, and `addIntegration` already skips a name the user configured. Fixes #25576 Fixes JS-3974 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…he defaults The Nuxt and SvelteKit Cloudflare SDKs build `defaultIntegrations` from the Cloudflare defaults and pass the list to the SDK. Since the SDK treats any `defaultIntegrations` list as an opt-out, it did not add the channel integration of a module that loads after `init()`, such as the `mysql` driver in a route chunk. The `nuxt-4-cloudflare` and `sveltekit-cloudflare-pages` E2E tests then got no db spans and timed out. The new internal option `extendsDefaultIntegrations` tells the SDK that the list extends the defaults, so it adds late integrations again. The user's `integrations` function still filters them. Nuxt and SvelteKit set the option only when they build the list. A list that the user passes still turns off late integrations. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
isaacs
force-pushed
the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
from
October 26, 2026 18:19
84563e6 to
7f836ed
Compare
isaacs
deleted the
isaacschlueter/js-3974-cloudflare-adds-back-channel-integrations-the-user-removed
branch
October 26, 2026 23:27
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.
The
@sentry/cloudflare/viteplugin registers an integration factory foreach instrumented package when the package first runs. A package that
runs after
init(), for example a driver loaded with a dynamicimport(), emitsorchestrion.module-injected, and the SDK then addedits integration without checking the user's options. So an
integrationsfunction that filtered the integration out,
defaultIntegrations: false,or a custom
defaultIntegrationslist did not keep it out. For the AIintegrations, that can turn prompt and response capture back on, and
whether it happened depended on module load order.
The handler now applies the rules that
init()applies to the defaults:defaultIntegrationsis set, the SDK defaults are off, so thehandler adds nothing.
integrationsis a function, the handler passes the lateintegration through it and installs the result with the same name, if
there is one. This calls the function again, once for each late
module. If the function throws, the handler skips the integration, so
the module load that emitted the event still works.
integrationsis an array, nothing changes. An array cannot removea default, and
addIntegrationalready skips a name the userconfigured.
The Nuxt and SvelteKit Cloudflare SDKs always pass a
defaultIntegrationslist, which they build from the Cloudflare defaults. Under the first rule
they lost every late integration, so the
nuxt-4-cloudflareandsveltekit-cloudflare-pagesE2E tests got nomysqlspans. These SDKsnow set the internal option
_extendsDefaultIntegrationswhen they buildthe list, so the handler still adds late integrations for them. A list
the user passes still turns them off. We kept this option over moving the
handler into a default integration, because a user who builds a list from
getDefaultIntegrations()and filters it would then still get thefiltered integration back.
Fixes #25576
Fixes JS-3974