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
{{ message }}
Repository navigation
Ensure we noop (NonRecordingSpan) in Sentry.startSpanXXX APIs when hasSpansEnabled() === false #17826
Today, if you do not enable tracing in Sentry at all, but use a custom OTEL setup, any calls of Sentry.startSpan() will emit spans into your custom otel setup.
While for users this is likely not super relevant, there is always the possibility for calls to our span APIs in our own code to leak like this, which is not really expected. So to avoid this, we should likely ensure to return a non recording span instead in these cases and not actually record a span.
NOTE: We should not use suppressTracing() for this as this would also suppress tracing inside of the callback. We may use suppress tracing in a nested way (?) possibly, but this could become a bit tricky:
Activity
linear commentedon Sep 30, 2025
JS-1004
fix(opentelemetry): Ensure Sentry spans don't leak when tracing is di…
fix(opentelemetry): Ensure Sentry spans don't leak when tracing is di…
github-actions commentedon Dec 2, 2025
A PR closing this issue has just been released 🚀
This issue was referenced by PR #18337, which was included in the 10.28.0 release.