You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@sentry/cloudflare: stubs from namespace.jurisdiction() bypass Durable Object instrumentation #24442
@sentry/cloudflare: 10.74.0 (also present on develop and 11.0.0-beta.2)
Caller wrapped with Sentry.withSentry(), enableRpcTracePropagation: true
Durable Object namespace restricted to a jurisdiction (env.MY_DO.jurisdiction('eu'))
Description
instrumentDurableObjectNamespace wraps get and getByName so the returned stub gets fetch spans and
RPC trace propagation. Every other function on the namespace, including jurisdiction, goes through value.bind(target), so a jurisdiction-restricted namespace is the raw binding. Stubs from it get
no fetch span and never append __sentry_rpc_meta__.
That applies to every Durable Object call from an app that uses data-location jurisdictions (for
example EU residency). The traces break at the Durable Object boundary. Combined with the receiver-side gap in #24443, the receiver
also loses all of its telemetry.
Reproduction
constns=env.MY_DO.jurisdiction('eu');conststub=ns.get(ns.idFromName('x'));awaitstub.someRpcMethod('a');// receiver sees no __sentry_rpc_meta__; no caller-side span
Compare with env.MY_DO.get(env.MY_DO.idFromName('x')), which does propagate.
Expected
jurisdiction() returns a namespace instrumented the same way, i.e. instrumentDurableObjectNamespace(value.apply(target, args), propagateRpcTrace).
Code
packages/cloudflare/src/instrumentations/instrumentDurableObjectNamespace.ts: the get trap only
special-cases get/getByName.
Hey thanks a lot for bringing this up, this was definitely not on my radar. I see you already created a PR for it - please let me know when it is ready to review, as it is currently a draft
Activity
linear-code commentedon Sep 16, 2026
JS-3698
JPeer264 commentedon Sep 16, 2026
Hey thanks a lot for bringing this up, this was definitely not on my radar. I see you already created a PR for it - please let me know when it is ready to review, as it is currently a draft
msnelling commentedon Sep 16, 2026
No problem. It's marked as ready now
fix(cloudflare): Instrument namespaces returned by jurisdiction() (#2…