feat(cloudflare)!: Revert set enableRpcTracePropagation to true by default - #23350
feat(cloudflare)!: Revert set enableRpcTracePropagation to true by default#23350JPeer264 wants to merge 3 commits into
Conversation
| ``` | ||
|
|
||
| - 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 |
There was a problem hiding this comment.
We should drop the TODO tho right?
There was a problem hiding this comment.
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
| * MyDOBase, | ||
| * ); | ||
| * | ||
| * // WorkerEntrypoint side (receiver) |
There was a problem hiding this comment.
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.
size-limit report 📦
|
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
instrumentPrototypeMethodswas 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)