Title: @sentry/cloudflare: Durable Object methods called from the constructor's blockConcurrencyWhile callback are captured as untraced RPC entries · Issue #24735 · getsentry/sentry-javascript · GitHub
Open Graph Title: @sentry/cloudflare: Durable Object methods called from the constructor's blockConcurrencyWhile callback are captured as untraced RPC entries · Issue #24735 · getsentry/sentry-javascript
X Title: @sentry/cloudflare: Durable Object methods called from the constructor's blockConcurrencyWhile callback are captured as untraced RPC entries · Issue #24735 · getsentry/sentry-javascript
Description: Version @sentry/cloudflare 10.75.1, with enableRpcTracePropagation: true Summary Since #24512, the RPC prototype wrapper instruments any prototype method called while the isolation scope is the default one, in a new trace. The wrapper is...
Open Graph Description: Version @sentry/cloudflare 10.75.1, with enableRpcTracePropagation: true Summary Since #24512, the RPC prototype wrapper instruments any prototype method called while the isolation scope is the def...
X Description: Version @sentry/cloudflare 10.75.1, with enableRpcTracePropagation: true Summary Since #24512, the RPC prototype wrapper instruments any prototype method called while the isolation scope is the def...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/24735
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@sentry/cloudflare: Durable Object methods called from the constructor's blockConcurrencyWhile callback are captured as untraced RPC entries","articleBody":"### Version\n\n`@sentry/cloudflare` 10.75.1, with `enableRpcTracePropagation: true`\n\n### Summary\n\nSince #24512, the RPC prototype wrapper instruments any prototype method called while the isolation scope is the default one, in a new trace. The wrapper is installed after construction, but a `blockConcurrencyWhile` callback started in the constructor runs after that, with no isolation scope. So a method the object calls on itself during initialisation is treated as an untraced RPC entry. If it throws, the error is captured as `handled: false` with mechanism `auto.faas.cloudflare.durable_object`, even when the object catches it.\n\n### Repro\n\n```ts\nclass Store extends DurableObject {\n failure?: Error;\n constructor(ctx: DurableObjectState, env: Env) {\n super(ctx, env);\n void ctx.blockConcurrencyWhile(async () => {\n try { this.init(); } catch (e) { this.failure = e as Error; }\n });\n }\n init(): void { throw new Error('init failed'); }\n ping(): string { return this.failure ? 'degraded' : 'ok'; }\n}\n\nexport const Instrumented = Sentry.instrumentDurableObjectWithSentry(\n (env) => ({ dsn: env.SENTRY_DSN, enableRpcTracePropagation: true }),\n Store,\n);\n```\n\nCall `ping()` on a stub.\n\n**Expected:** no error event. The error is caught inside the object.\n\n**Actual:** one error event for `init failed`, `handled: false`, in its own trace.\n\nObserved in real workerd (`@cloudflare/vitest-pool-workers`). With a raised `Error.stackTraceLimit`, the capturing frame is the untraced `startNewTrace` branch in `durableobject.ts`, wrapping the method called from the constructor's `blockConcurrencyWhile` callback.\n\n### Notes\n\nDeclaring internal methods as `#private` avoids it, because they are no longer on the prototype, and that matches Cloudflare's RPC visibility guidance (https://developers.cloudflare.com/workers/runtime-apis/rpc/visibility/). It may be worth either documenting that, or running constructor-time `blockConcurrencyWhile` callbacks inside an isolation scope so they are not mistaken for RPC entries.\n","author":{"url":"https://github.com/msnelling","@type":"Person","name":"msnelling"},"datePublished":"2026-09-25T10:03:23Z","url":"https://github.com/getsentry/sentry-javascript/issues/24735"}
| 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:d0655d45-a53c-a019-7c68-20bca6a11df1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB84:1F63A9:939A2:CB47B:6B044452 |
| html-safe-nonce | 2ea55b6e0c6752281f5e6c72270e77cb9b4f70a4545452233cbf37353db6926a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjg0OjFGNjNBOTo5MzlBMjpDQjQ3Qjo2QjA0NDQ1MiIsInZpc2l0b3JfaWQiOiI3NjE5MTc2MzE0NTAyOTIzMzQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 321a36b4f6a5799612db774adf2646c521a7270f988e837dce61177c57beda57 |
| hovercard-subject-tag | issue:5581292419 |
| 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/24735/issue_layout |
| twitter:image | https://opengraph.githubassets.com/071bf6bfc4d0de8d38c8bdb899ee690c6585574d10b13109da6b089948f04037/getsentry/sentry-javascript/issues/24735 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/071bf6bfc4d0de8d38c8bdb899ee690c6585574d10b13109da6b089948f04037/getsentry/sentry-javascript/issues/24735 |
| og:image:alt | Version @sentry/cloudflare 10.75.1, with enableRpcTracePropagation: true Summary Since #24512, the RPC prototype wrapper instruments any prototype method called while the isolation scope is the def... |
| 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 | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| 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 | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| 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