Skip to content

feat(cloudflare)!: Revert set enableRpcTracePropagation to true by default - #23350

Open
JPeer264 wants to merge 3 commits into
developfrom
jp/rpc-revert
Open

feat(cloudflare)!: Revert set enableRpcTracePropagation to true by default#23350
JPeer264 wants to merge 3 commits into
developfrom
jp/rpc-revert

Conversation

@JPeer264

@JPeer264 JPeer264 commented Aug 12, 2026

Copy link
Copy Markdown
Member

reverts #23079

It is bad if we actually set this on by default, not because of performance, but because other uninstrumented services could fail. Instead we will add an allow list like instrumentPrototypeMethods was before which is opt-in when using without Vite and when using it with the Vite plugin we allow list all bindings within one deployment automatically and all other services are opt-in (follow up PRs).

This is the only way to not modify RPC calls to external deployments. See #23233 (comment)

@JPeer264 JPeer264 self-assigned this Aug 12, 2026
@JPeer264
JPeer264 requested a review from a team as a code owner August 12, 2026 12:54
@JPeer264
JPeer264 requested review from isaacs and mydea and removed request for a team August 12, 2026 12:54
@JPeer264 JPeer264 changed the title Revert "feat(cloudflare)!: Set enableRpcTracePropagation to true by default Revert "feat(cloudflare)!: Set enableRpcTracePropagation to true by default" Aug 12, 2026
@JPeer264 JPeer264 changed the title Revert "feat(cloudflare)!: Set enableRpcTracePropagation to true by default" feat(cloudflare)!: Revert set enableRpcTracePropagation to true by default Aug 12, 2026
@JPeer264
JPeer264 requested review from andreiborza and nicohrubec and removed request for isaacs August 12, 2026 12:55
Comment thread MIGRATION.md Outdated
```

- The `enableRpcTracePropagation` option now defaults to `true`. Trace context is propagated across RPC calls (service bindings, Durable Objects, WorkerEntrypoints) unless you explicitly set `enableRpcTracePropagation: false`.
> **TODO(v11):** This might change to `enableRpcTracePropagation: true` by default. This depends on the outcomes of #20525

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should drop the TODO tho right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I wanted to revert it only and update the migration.md properly with the new changes. Since we have now a different migration.md file it might make sense to remove it entirely here for now

Comment thread MIGRATION.md Outdated
* MyDOBase,
* );
*
* // WorkerEntrypoint side (receiver)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The migration guide incorrectly states enableRpcTracePropagation defaults to true. The PR changes the default to false, but the documentation was not updated to reflect this.
Severity: HIGH

Suggested Fix

Update the migration documentation in docs/migration/v11-end-state.md. Correct the statement about enableRpcTracePropagation to reflect that it now defaults to false and is an opt-in feature. Emphasize that users must explicitly set enableRpcTracePropagation: true on both the caller and receiver to enable full trace propagation.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: packages/cloudflare/src/client.ts#L226

Potential issue: The PR reverts the default value of `enableRpcTracePropagation` from
`true` back to `false`. However, the migration documentation in
`docs/migration/v11-end-state.md` was not updated to reflect this change. The guide
still claims the option defaults to `true`. This discrepancy will cause users following
the migration guide to believe RPC trace propagation is enabled by default, leading to a
silent loss of tracing data when it is actually disabled. They will not see RPC spans in
their traces and may only discover this when debugging production issues.

Did we get this right? 👍 / 👎 to inform future reviews.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.34 kB - -
@sentry/browser - with treeshaking flags 28.51 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.85 kB - -
@sentry/browser (incl. Tracing) 48.56 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.57 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.45 kB - -
@sentry/browser (incl. Tracing, Replay) 87.97 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.35 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.69 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.37 kB - -
@sentry/browser (incl. Feedback) 47.66 kB - -
@sentry/browser (incl. sendFeedback) 35.16 kB - -
@sentry/browser (incl. FeedbackAsync) 40.31 kB - -
@sentry/browser (incl. Metrics) 31.31 kB - -
@sentry/browser (incl. Logs) 31.58 kB - -
@sentry/browser (incl. Metrics & Logs) 32.25 kB - -
@sentry/react 32.13 kB - -
@sentry/react (incl. Tracing) 50.77 kB - -
@sentry/vue 35.35 kB - -
@sentry/vue (incl. Tracing) 50.51 kB - -
@sentry/svelte 30.37 kB - -
CDN Bundle 31.64 kB - -
CDN Bundle (incl. Tracing) 48.89 kB - -
CDN Bundle (incl. Logs, Metrics) 33.86 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.85 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.38 kB - -
CDN Bundle (incl. Tracing, Replay) 86.48 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.34 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.19 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.16 kB - -
CDN Bundle - uncompressed 93.94 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.76 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.34 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.56 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.28 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.02 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 271.81 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.72 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.49 kB - -
@sentry/nextjs (client) 53.29 kB - -
@sentry/sveltekit (client) 48.98 kB - -
@sentry/core/server 65.44 kB - -
@sentry/core/browser 51.8 kB - -
@sentry/node 117.97 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 82.09 kB +0.01% +1 B 🔺
@sentry/aws-serverless 91.5 kB -0.01% -2 B 🔽
@sentry/cloudflare (withSentry) - minified 214.06 kB -0.01% -13 B 🔽
@sentry/cloudflare (withSentry) 528.86 kB -0.01% -27 B 🔽

View base workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants