Repository navigation
Cloudflare v11 potential breaking changes tracking #20682
Copy link
Copy link
Closed
Description
Tracking issue for breaking changes to implement in @sentry/cloudflare for v11.
Documented TODOs in the codebase
- (done via Rename
InboundFiltersintegration toEventFilters#15431) ReplaceinboundFiltersIntegrationwitheventFiltersIntegration// TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration` - (done via feat(cf/vercel-edge)!: Align request data collection with v11 defaults #22850**) Move**
includeobject into integration based onsendDefaultPii// TODO(v11): the `include` object should be defined directly in the integration based on `sendDefaultPii` - (done via fix(cloudflare): Restore env type inference for options callbacks #22963**)** Rewrite
withSentrygeneric types for better type safety// TODO(v11): The generic types need to be rewritten to following to improve type safety: - (stays in v11 as well) Remove span links workaround in
wrapMethodWithSentry// span links and then we should remove this again. Also throwing in a TODO(v11), to remind us
Deprecated Options to Remove
Note: Check if we shouldn't remove both options based on #20525
- Remove
instrumentPrototypeMethodsoption (replaced byenableRpcTracePropagation)
https://github.com/getsentry/sentry-javascript/blob/ff11476637576fdc820ba08275d0f36f87384762/packages/cloudflare/src/client.ts#L203sentry-javascript/packages/cloudflare/src/utils/rpcOptions.ts
Lines 6 to 34 in ff11476
* Gets the effective RPC propagation setting, handling deprecation of `instrumentPrototypeMethods`. * * Priority: * 1. If `enableRpcTracePropagation` is set, use it (ignore `instrumentPrototypeMethods`) * 2. If only `instrumentPrototypeMethods` is set, use it with deprecation warning * 3. If neither is set, return `false` * * @returns The effective setting for RPC trace propagation */ export function getEffectiveRpcPropagation(options: CloudflareOptions): boolean { const { enableRpcTracePropagation, instrumentPrototypeMethods } = options; // If the new option is explicitly set, use it if (enableRpcTracePropagation !== undefined) { if (instrumentPrototypeMethods !== undefined) { DEBUG_BUILD && debug.warn( '[Sentry] Both `enableRpcTracePropagation` and `instrumentPrototypeMethods` are set. ' + 'Using `enableRpcTracePropagation` and ignoring `instrumentPrototypeMethods`.', ); } return enableRpcTracePropagation; } // Fall back to deprecated option with warning if (instrumentPrototypeMethods !== undefined) { DEBUG_BUILD && debug.warn( '[Sentry] `instrumentPrototypeMethods` is deprecated and will be removed in a future major version. ' +
Potential Additional Breaking Changes
- Make D1 instrumentation opt-in - Tree-shakeable integration to reduce bundle size
- Consolidate async context strategy initialization - Currently set in multiple places (
withSentry,sentryPagesPlugin,instrumentDurableObjectClass) - Remove
wrapRequestHandlerfrom public API - Low-level internal API. This is used in couple of projects, maybe we still need this
Reactions are currently unavailable
Metadata
Metadata
Assignees
Projects
- StatusShow more project fieldsNo status
Activity
linear-code commentedon May 5, 2026
JS-2359
m13v commentedon Jun 18, 2026
the inboundFilters to eventFilters rename and the instrumentPrototypeMethods removal both close cleanly inside the package, but the boundary that list doesn't touch is the consumer's frozen v10 config. once a deprecated option is gone in v11, the failure mode flips from a deprecation warning to a silent no-op on upgrade, since unknown keys just get ignored at init. worth deciding now whether v11 warns on unrecognized options or stays quiet, otherwise people carry dead config across the major and never learn the integration stopped applying.
JPeer264 commentedon Jun 19, 2026
In theory we remove the types from the config itself, so actually there should be a TypeScript error popping up. It would be silent for everyone who doesn't use TypeScript. Since this would apply also for other SDKs I'm unsure if some extra bytes are worth to check for a dead config (as this would need during runtime if I understood it correctly), while
// @ts-checkon JavaScript files would potentially solve the issue. Or am I missing something?ref(cloudflare)!: Remove instrumentPrototypeMethods option (#22961)
JPeer264 commentedon Aug 6, 2026
Done. Updated everything relevant in the description