Title: Cloudflare RPC trace propagation changes method arguments for uninstrumented receivers · Issue #23233 · getsentry/sentry-javascript · GitHub
Open Graph Title: Cloudflare RPC trace propagation changes method arguments for uninstrumented receivers · Issue #23233 · getsentry/sentry-javascript
X Title: Cloudflare RPC trace propagation changes method arguments for uninstrumented receivers · Issue #23233 · getsentry/sentry-javascript
Description: Environment @sentry/cloudflare: 10.69.0 Cloudflare Workers service-binding RPC Caller: wrapped with Sentry.withSentry() Receiver: plain, uninstrumented WorkerEntrypoint Description With enableRpcTracePropagation: true, the Cloudflare SDK...
Open Graph Description: Environment @sentry/cloudflare: 10.69.0 Cloudflare Workers service-binding RPC Caller: wrapped with Sentry.withSentry() Receiver: plain, uninstrumented WorkerEntrypoint Description With enableRpcTr...
X Description: Environment @sentry/cloudflare: 10.69.0 Cloudflare Workers service-binding RPC Caller: wrapped with Sentry.withSentry() Receiver: plain, uninstrumented WorkerEntrypoint Description With enableRpcTr...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/23233
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cloudflare RPC trace propagation changes method arguments for uninstrumented receivers","articleBody":"### Environment\n\n- `@sentry/cloudflare`: 10.69.0\n- Cloudflare Workers service-binding RPC\n- Caller: wrapped with `Sentry.withSentry()`\n- Receiver: plain, uninstrumented `WorkerEntrypoint`\n\n### Description\n\nWith `enableRpcTracePropagation: true`, the Cloudflare SDK propagates trace context for RPC method calls by appending a trailing `{ __sentry_rpc_meta__: ... }` argument.\n\nA receiver wrapped by Sentry removes that argument before invoking application code. A plain receiver does not, so enabling Sentry on the caller changes the receiver's application-visible RPC arguments.\n\nThis can occur during gradual deployments, rollbacks, mixed SDK versions, or when an instrumented Worker calls a service that does not use Sentry.\n\n### Minimal reproduction\n\nDefine an uninstrumented receiver with an optional trailing parameter:\n\n```ts\nimport { WorkerEntrypoint } from \"cloudflare:workers\";\n\nexport default class Receiver extends WorkerEntrypoint {\n inspect(first: string, second: string, optionalTimeoutMs?: number) {\n return {\n first,\n second,\n optionalArgumentType: typeof optionalTimeoutMs,\n receivedSentryMetadata:\n typeof optionalTimeoutMs === \"object\" &&\n optionalTimeoutMs !== null &&\n \"__sentry_rpc_meta__\" in optionalTimeoutMs,\n };\n }\n}\n```\n\nWrap only the caller and enable RPC trace propagation:\n\n```ts\nexport default Sentry.withSentry(\n env => ({\n dsn: env.SENTRY_DSN,\n tracesSampleRate: 1,\n enableRpcTracePropagation: true,\n }),\n Caller,\n);\n```\n\nFrom an active sampled trace, call:\n\n```ts\nawait env.RECEIVER.inspect(\"first\", \"second\");\n```\n\n### Actual behavior\n\nThe receiver observes a third object argument containing `__sentry_rpc_meta__`. In this example, `optionalArgumentType` is `\"object\"` rather than `\"undefined\"`.\n\nThis can silently alter behavior. For example, if an optional numeric argument is passed to `setTimeout`, the metadata object may be coerced into an immediate timeout.\n\n### Expected behavior\n\nEnabling tracing on a caller should not change the receiver's application-visible RPC arguments. If mixed instrumentation cannot preserve RPC semantics, the SDK should fail safely or provide a clear runtime/configuration warning rather than forwarding internal metadata into application parameters.\n\n### Additional context\n\nThe SDK documentation says both sides should enable this option for full trace propagation. That explains why an instrumented receiver can extract the metadata, but it does not make mixed deployments safe: caller-only instrumentation currently changes the RPC method contract rather than merely losing trace continuity.\n\nPossible directions include an out-of-band propagation mechanism, mixed-version-safe negotiation, or an explicit guard/warning when safe receiver extraction cannot be guaranteed.\n","author":{"url":"https://github.com/matthew-gizmo","@type":"Person","name":"matthew-gizmo"},"datePublished":"2026-08-10T13:02:39Z","url":"https://github.com/getsentry/sentry-javascript/issues/23233"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f7c1866c-3c00-0c32-da3e-6f7ca123fd90 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF36:2F6455:1F807:2B6DF:6B042B37 |
| html-safe-nonce | a76571b6b36532368d00c77e9d8facd0c7f379668b39967543f414eab889746b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjM2OjJGNjQ1NToxRjgwNzoyQjZERjo2QjA0MkIzNyIsInZpc2l0b3JfaWQiOiI4MzU1ODU3OTQ3NDI5NTQ4MDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d5440d4e7182791074b0e2622b223e2c50db0dc7699e0c9856eb5591c977ba2f |
| hovercard-subject-tag | issue:5110360864 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/23233/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ed00bd0bd00a8330e44340df3adc373f017cf28a2bdf08054dae12940ece3e31/getsentry/sentry-javascript/issues/23233 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ed00bd0bd00a8330e44340df3adc373f017cf28a2bdf08054dae12940ece3e31/getsentry/sentry-javascript/issues/23233 |
| og:image:alt | Environment @sentry/cloudflare: 10.69.0 Cloudflare Workers service-binding RPC Caller: wrapped with Sentry.withSentry() Receiver: plain, uninstrumented WorkerEntrypoint Description With enableRpcTr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | matthew-gizmo |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width