Skip to content

feat: Adopt bindTracingChannelToSpan across runtimes#21642

Draft
logaretm wants to merge 1 commit into
awad/bind-tracing-channelfrom
awad/adopt-bind-tracing-channel
Draft

feat: Adopt bindTracingChannelToSpan across runtimes#21642
logaretm wants to merge 1 commit into
awad/bind-tracing-channelfrom
awad/adopt-bind-tracing-channel

Conversation

@logaretm

@logaretm logaretm commented Jun 18, 2026

Copy link
Copy Markdown
Member

This PR adopts bindTracingChannelToSpan utility across our packages, and drops the tracingChannel helper we had.

The tracingChannel drop isn't a breaking change imo, its an internal export used by us exclusively.

@logaretm logaretm force-pushed the awad/bind-tracing-channel branch from 8c4ca47 to 61a560f Compare June 18, 2026 17:56
@logaretm logaretm force-pushed the awad/adopt-bind-tracing-channel branch from e189fda to 3f71785 Compare June 18, 2026 17:56
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.45 kB - -
@sentry/browser - with treeshaking flags 25.88 kB - -
@sentry/browser (incl. Tracing) 45.91 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.16 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.69 kB - -
@sentry/browser (incl. Tracing, Replay) 85.1 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.71 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.8 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.47 kB - -
@sentry/browser (incl. Feedback) 44.62 kB - -
@sentry/browser (incl. sendFeedback) 32.25 kB - -
@sentry/browser (incl. FeedbackAsync) 37.38 kB - -
@sentry/browser (incl. Metrics) 28.52 kB - -
@sentry/browser (incl. Logs) 28.76 kB - -
@sentry/browser (incl. Metrics & Logs) 29.45 kB - -
@sentry/react 29.25 kB - -
@sentry/react (incl. Tracing) 48.21 kB - -
@sentry/vue 32.58 kB - -
@sentry/vue (incl. Tracing) 47.78 kB - -
@sentry/svelte 27.48 kB - -
CDN Bundle 29.86 kB - -
CDN Bundle (incl. Tracing) 48.32 kB - -
CDN Bundle (incl. Logs, Metrics) 31.4 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.62 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.71 kB - -
CDN Bundle (incl. Tracing, Replay) 85.64 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.9 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.49 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.73 kB - -
CDN Bundle - uncompressed 88.8 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.13 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 93.5 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.1 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 218.33 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.99 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268.95 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 278.69 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 282.64 kB - -
@sentry/nextjs (client) 50.61 kB - -
@sentry/sveltekit (client) 46.3 kB - -
@sentry/core/server 76.24 kB +0.04% +26 B 🔺
@sentry/core/browser 63.36 kB +0.04% +23 B 🔺
@sentry/node-core 61.98 kB +0.13% +78 B 🔺
@sentry/node 124.01 kB -0.55% -679 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.05 kB - -
@sentry/node/light 51.03 kB +0.11% +51 B 🔺
@sentry/node - without tracing 74.33 kB +0.08% +56 B 🔺
@sentry/aws-serverless 85.44 kB +0.08% +68 B 🔺
@sentry/cloudflare (withSentry) - minified 174.78 kB +0.13% +226 B 🔺
@sentry/cloudflare (withSentry) 437.28 kB +0.1% +427 B 🔺

View base workflow run

@logaretm logaretm force-pushed the awad/adopt-bind-tracing-channel branch from 3f71785 to 8ec64f0 Compare June 18, 2026 19:04
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.
@logaretm logaretm force-pushed the awad/adopt-bind-tracing-channel branch from 8ec64f0 to 7a09a2e Compare June 19, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant