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
fix(cloudflare): Initialize once per workflow run and preserve scope for step.do (#17582)
Previously, our Cloudflare Workflows instrumentation created a new
Sentry client inside every `step.do`. This resets the tracing context: a
custom span started with `startSpan` around multiple `step.do` would
finish under a different client/scope than its children.
This change initializes Sentry once per workflow run and preserves the
active scope across steps. We capture the current scope in `step.do` and
pass it to `startSpan`.
A new test was added to check that a `step.do` span becomes a child of a
surrounding custom span.
fixes#17419
ref (for being able to test this):
cloudflare/workerd#5030
Multiple `step.do` with a surrounding `startSpan` call will now result
in this:
<img width="851" height="265" alt="image"
src="https://github.com/user-attachments/assets/298dc085-6555-46cb-93da-a22dd9f7ca02"
/>
0 commit comments