-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
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(...)andtracesSampleRate: 1.0. - Instrument the Durable Object with
instrumentDurableObjectWithSentry(...), also withtracesSampleRate: 1.0andinstrumentPrototypeMethods: 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.serverwon'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)
- the Worker HTTP transaction/span (
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.
Metadata
Metadata
Assignees
Projects
Status