Skip to content

Cloudflare v11 potential breaking changes tracking #20682

Description

@JPeer264

Tracking issue for breaking changes to implement in @sentry/cloudflare for v11.

Documented TODOs in the codebase

Deprecated Options to Remove

Note: Check if we shouldn't remove both options based on #20525

  • Remove instrumentPrototypeMethods option (replaced by enableRpcTracePropagation)
    https://github.com/getsentry/sentry-javascript/blob/ff11476637576fdc820ba08275d0f36f87384762/packages/cloudflare/src/client.ts#L203
    * 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 wrapRequestHandler from public API - Low-level internal API. This is used in couple of projects, maybe we still need this

Metadata

Metadata

Assignees

Projects

Status
No status

Relationships

None yet

Development

No branches or pull requests

Issue actions