Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/cloudflare - hono
SDK Version
10.38.0
Framework Version
Hono 4.10.1, Wrangler 4.55.0
Link to Sentry event
https://enhance-labs.sentry.io/explore/traces/trace/d0a891c5ab8848c5acfd9c802c1f28af
Reproduction Example/SDK Setup
DO Sentry init:
export const MyDO = Sentry.instrumentDurableObjectWithSentry(
(env: Env) => ({
dsn: "...",
tracesSampleRate: 1.0,
enableLogs: true,
environment: env.ENVIRONMENT,
instrumentPrototypeMethods: true,
}),
MyDOBase,
);
Worker init options (which calls the DO):
{
dsn: "...",
sendDefaultPii: true,
environment: env.ENVIRONMENT,
tracesSampleRate: 1.0,
enableLogs: true,
}
Steps to Reproduce
- Instrument the Worker with
withSentry(...) and tracesSampleRate: 1.0.
- Instrument the Durable Object with
instrumentDurableObjectWithSentry(...), also with tracesSampleRate: 1.0 and instrumentPrototypeMethods: true.
- Use the same DSN for both Worker and DO (same behaviour occurs with different DSNs though - using a different DSN in the DO is actually ignored and sends DO traces to the Worker DSN, possibly another bug but not what I'm trying to do so I am not concerned)
- In Worker
fetch, call a DO RPC method (e.g. stub.rpcPing()), then return a response.
- Run locally (
wrangler dev) and call the endpoint a few times
- In Sentry Traces, inspect:
- the Worker HTTP transaction/span (
http.server won't have child spans for the DO RPC call)
- the DO RPC spans will all be in a single trace for that DO (for DO lifecycle I assume) (
op=rpc)
Expected Result
I would expect RPC methods to behave like DO.fetch in that the worker trace and baggage is propagated/they appear as child spans
Actual Result
Here's a trace for lots of server requests that had DO calls: https://enhance-labs.sentry.io/explore/traces/trace/ce631a8e51d74ba7b5398198b5c92778
Here's the trace where those DO calls ended up: https://enhance-labs.sentry.io/explore/traces/trace/d0a891c5ab8848c5acfd9c802c1f28af/
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/cloudflare - hono
SDK Version
10.38.0
Framework Version
Hono 4.10.1, Wrangler 4.55.0
Link to Sentry event
https://enhance-labs.sentry.io/explore/traces/trace/d0a891c5ab8848c5acfd9c802c1f28af
Reproduction Example/SDK Setup
DO Sentry init:
Worker init options (which calls the DO):
Steps to Reproduce
withSentry(...)andtracesSampleRate: 1.0.instrumentDurableObjectWithSentry(...), also withtracesSampleRate: 1.0andinstrumentPrototypeMethods: true.fetch, call a DO RPC method (e.g.stub.rpcPing()), then return a response.wrangler dev) and call the endpoint a few timeshttp.serverwon't have child spans for the DO RPC call)op=rpc)Expected Result
I would expect RPC methods to behave like DO.fetch in that the worker
traceandbaggageis propagated/they appear as child spansActual Result
Here's a trace for lots of server requests that had DO calls: https://enhance-labs.sentry.io/explore/traces/trace/ce631a8e51d74ba7b5398198b5c92778
Here's the trace where those DO calls ended up: https://enhance-labs.sentry.io/explore/traces/trace/d0a891c5ab8848c5acfd9c802c1f28af/
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.