Skip to content

Cloudflare v11 potential breaking changes tracking #20682

@JPeer264

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)
    * @deprecated Use `enableRpcTracePropagation` instead. This option will be removed in a future major version.

    * 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

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions