Uh oh!
There was an error while loading. Please reload this page.
feat(cloudflare): Derive rpcTracePropagationBindings from the wrangler config - #23491
Conversation
size-limit report 📦
|
JPeer264
commented
Aug 23, 2026
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a85e9fb. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
562ceae to
ceb803dCompareceb803d to
16c724fComparec5b4c26 to
5e5b6a8Compare29752e8 to
6a991faCompare6a991fa to
4e616dfCompareUh oh!
There was an error while loading. Please reload this page.
…r config The Vite plugin already knows which bindings resolve to receivers it instruments itself: Durable Object bindings without a `script_name`, and service bindings naming this worker. Those are exactly the bindings whose trailing trace argument is guaranteed to be stripped again, so the plugin adds them to `rpcTracePropagationBindings` and same-deployment RPC traces connect without any configuration. Bindings to other workers stay opt-in. Only bindings whose receiver class the transform wrapped itself are added. A class the user wrapped by hand, or re-exported from another module, runs on its own options and cannot be assumed to strip the argument. The options object only exists once the callback runs with `env`, so the plugin cannot merge at build time. The transform emits an inline callback that wraps the user's one and merges the binding names, so no runtime helper export is needed. Note this default only applies to Vite builds. At runtime a DurableObjectNamespace exposes no origin and a Fetcher does not say which service it points at, so a plain wrangler build still has to list its bindings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…as auto-wrapped `export default Foo`, where a named export already wrapped `Foo`, skips wrapping to avoid `withSentry(withSentry(...))`, but the binding still points at the wrapped class. Mark the default export as auto-wrapped so an entrypoint-less self service binding survives into `rpcTracePropagationBindings`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3c8302d to
0598681CompareUh oh!
There was an error while loading. Please reload this page.
…ngler config (#23738) Backport of: #23491 ## Differences to the original PR - `packages/cloudflare/src/vite/transform.ts`: the generated options callback also sets `enableRpcTracePropagation: opts?.enableRpcTracePropagation ?? true`. On v10 the receiver still reads that option to continue an incoming trace, and the plugin wrapped those receiver classes itself, so it can turn it on. An explicit value in the user's options wins. Without it the derived bindings would propagate but no receiver span would be created. - `packages/cloudflare/src/vite/index.ts` and the new integration suite's `vite.config.mts`: `autoInstrumentation` lives under `_experimental` on v10, so the doc paragraph and the test config use that shape.

The Vite plugin already knows which bindings resolve to receivers it instruments itself: Durable Object bindings without a
script_name, and service bindings naming this worker. Those are exactly the bindings whose trailing trace argument is guaranteed to be stripped again, so the plugin adds them torpcTracePropagationBindingsand same-deployment RPC traces connect without any configuration. Bindings to other workers stay opt-in.Only bindings whose receiver class the transform wrapped itself are added. A class the user wrapped by hand, or re-exported from another module, runs on its own options and cannot be assumed to strip the argument.
The options object only exists once the callback runs with
env, so the plugin cannot merge at build time. The transform emits an inline callback that wraps the user's one and merges the binding names, so no runtime helper export is needed.Note this default only applies to Vite builds. At runtime a DurableObjectNamespace exposes no origin and a Fetcher does not say which service it points at, so a plain wrangler build still has to list its bindings.