feat: Adopt bindTracingChannelToSpan across runtimes#21642
Conversation
8c4ca47 to
61a560f
Compare
e189fda to
3f71785
Compare
size-limit report 📦
|
8ec64f0 to
7a09a2e
Compare
| expect.objectContaining({ | ||
| handled: false, | ||
| type: 'auto.http.nitro.onTraceError', | ||
| type: 'auto.diagnostic_channels.bind_span', |
There was a problem hiding this comment.
this is no good, this should be somewhat similar to what it was before 😬
There was a problem hiding this comment.
okay I can add an option for error mechanism to preserve this
2fbdda3 to
3cb7959
Compare
7a09a2e to
a11202f
Compare
3cb7959 to
e34e28a
Compare
d452bdb to
2d8060e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2d8060e. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2d8060e. Configure here.
Migrate the Nitro HTTP/storage channels and the node/deno redis diagnostics_channel subscribers off the `@sentry/opentelemetry` `tracingChannel` helper onto `bindTracingChannelToSpan` from `@sentry/server-utils`, using the `auto` lifecycle. - Add `beforeSpanEnd(span, data)` to enrich the span on the canonical terminal event (sync `end` / async `asyncEnd`) right before it ends. - Add `captureError` (default `true`) to gate exception capture; the span error status is always set. Redis opts out (`captureError: false`) since command failures are captured at the boundary that owns them. - Unify the error mechanism to `auto.diagnostic_channels.bind_span`. - Create channel spans with `startInactiveSpan`; the binding activates the span as the async context, so parenting is preserved. - node and deno redis now pass the native `node:diagnostics_channel` `tracingChannel` directly; deno's bespoke factory is removed. BREAKING: remove the `@sentry/opentelemetry/tracing-channel` subpath export (shipped in 10.58.0); use `bindTracingChannelToSpan` instead.
766b254 to
05cfa5b
Compare

This PR adopts
bindTracingChannelToSpanutility across our packages, and drops thetracingChannelhelper we had.The
tracingChanneldrop isn't a breaking change imo, its an internal export used by us exclusively.