Title: @sentry/cloudflare: Durable Object RPC methods drop metrics, logs and errors unless the caller propagates a trace · Issue #24443 · getsentry/sentry-javascript · GitHub
Open Graph Title: @sentry/cloudflare: Durable Object RPC methods drop metrics, logs and errors unless the caller propagates a trace · Issue #24443 · getsentry/sentry-javascript
X Title: @sentry/cloudflare: Durable Object RPC methods drop metrics, logs and errors unless the caller propagates a trace · Issue #24443 · getsentry/sentry-javascript
Description: Environment @sentry/cloudflare: 10.74.0 (same logic on develop / 11.0.0-beta.2) DO wrapped with instrumentDurableObjectWithSentry, enableRpcTracePropagation: true (the only supported way to instrument RPC methods in v11, now that instrum...
Open Graph Description: Environment @sentry/cloudflare: 10.74.0 (same logic on develop / 11.0.0-beta.2) DO wrapped with instrumentDurableObjectWithSentry, enableRpcTracePropagation: true (the only supported way to instrum...
X Description: Environment @sentry/cloudflare: 10.74.0 (same logic on develop / 11.0.0-beta.2) DO wrapped with instrumentDurableObjectWithSentry, enableRpcTracePropagation: true (the only supported way to instrum...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/24443
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@sentry/cloudflare: Durable Object RPC methods drop metrics, logs and errors unless the caller propagates a trace","articleBody":"### Environment\n- `@sentry/cloudflare`: 10.74.0 (same logic on `develop` / `11.0.0-beta.2`)\n- DO wrapped with `instrumentDurableObjectWithSentry`, `enableRpcTracePropagation: true` (the only\n supported way to instrument RPC methods in v11, now that `instrumentPrototypeMethods` is removed)\n\n### Description\n`createRpcPrototypeWrapper` only calls `wrapMethodWithSentry` when the last argument carries\n`__sentry_rpc_meta__`. Otherwise the original method runs with no client bound. Then:\n\n- `Sentry.metrics.count/gauge/distribution` return early (no client);\n- `Sentry.captureException` and `Sentry.logger.*` are dropped;\n- no `rpc` span is recorded, and a thrown error is not captured.\n\nCallers send the metadata only if they are Sentry-instrumented, have an active trace, **and** got the stub\nthrough `get`/`getByName` on the instrumented env (see #24442). Common cases that lose everything:\n\n- calls from uninstrumented workers or mixed deployments;\n- calls from code running outside the request's async context;\n- any call through `jurisdiction()`.\n\n`WorkerEntrypoint` already covers this case: `instrumentWorkerEntrypoint` uses a capture-only wrapper\nwhen the metadata is missing. Durable Objects have no equivalent. `fetch`, `alarm` and `webSocket*` are\nalways wrapped, so only RPC is affected. That makes the gap easy to miss: our production data had\n14 days of DO `alarm` spans and zero DO `rpc` spans.\n\n### Reproduction\n```ts\nclass MyDO extends DurableObject {\n async ping() {\n Sentry.metrics.count('my_do.ping', 1);\n throw new Error('boom');\n }\n}\nexport const MyDOInstrumented = Sentry.instrumentDurableObjectWithSentry(\n env => ({ dsn: env.SENTRY_DSN, tracesSampleRate: 1, enableRpcTracePropagation: true }),\n MyDO,\n);\n// From a plain (uninstrumented) worker:\nawait env.MY_DO.get(env.MY_DO.idFromName('x')).ping();\n```\nNeither the metric nor the error reaches Sentry.\n\n### Expected\nExternal RPC calls without metadata still run inside a client and isolation scope with flush, as\n`WorkerEntrypoint` does. Internal `this.method()` calls stay unwrapped.\n\n### Proposed fix\nA PR with this change will follow.\n","author":{"url":"https://github.com/msnelling","@type":"Person","name":"msnelling"},"datePublished":"2026-09-16T11:47:44Z","url":"https://github.com/getsentry/sentry-javascript/issues/24443"}
| 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:9993ec4d-825d-3f3e-7c5a-843297244365 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 91FE:2B059D:550BE7:7507B9:6B04552D |
| html-safe-nonce | 3ce5fb697245ff745877f546bbe54faeedf8f2a9f3f1b7a18fe92ff8101defd4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUZFOjJCMDU5RDo1NTBCRTc6NzUwN0I5OjZCMDQ1NTJEIiwidmlzaXRvcl9pZCI6IjYyODQwMjYzNjU1MDMzNjIzNTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b327d19d146109c15bec0992f723bcff8d54ce60308809e87bb9b6c7fc2ec6aa |
| hovercard-subject-tag | issue:5474095256 |
| 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/24443/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e39535ab38e564f46b2468967af853f558490375a7ec78c2c828c905660e2925/getsentry/sentry-javascript/issues/24443 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e39535ab38e564f46b2468967af853f558490375a7ec78c2c828c905660e2925/getsentry/sentry-javascript/issues/24443 |
| og:image:alt | Environment @sentry/cloudflare: 10.74.0 (same logic on develop / 11.0.0-beta.2) DO wrapped with instrumentDurableObjectWithSentry, enableRpcTracePropagation: true (the only supported way to instrum... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | msnelling |
| hostname | github.com |
| expected-hostname | github.com |
| None | 910ca0e260cfec6aff11407d8dc6a0d3a4cd381a2ec9ada56627b063426892a0 |
| 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 | e086f9b7e88322eb2b41885a6ad425b215737fa5 |
| 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