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
Propagate tracing span attributes in sentry events #617
Thanks for providing Rust support. We're happily using sentry and sentry-tracing crates. Mostly all working well.
We expose a ton of helpful debugging information through span attributes. As far as I can tell, these are captured for performance monitoring, but aren't provided as context when capturing events (via tracing::error! for example).
Is there any way that any span data captured could also be included in events emitted by sentry-tracing?
I don’t think this is currently possible. Other members of the team are prototyping ways to rewamp the performance monitoring / tracing APIs to make such things easier in the future, but it is still very early in that process.
Unfortuantely, this feature appears to be tied to a span_filter that records the span which in turn might spam many spans to Sentry's Tracing feature. It would be great if we can record fields from spans in breadcrumbs while at the same time, only submit certain spans to Sentry.
Could we move the sampling of the span to the finish part? i.e. record it locally to ensure it is active when events try to extract fields for breadcrumbs and the sampling simply prevents it from being sent to Sentry?
It would be great if we can record fields from spans in breadcrumbs while at the same time, only submit certain spans to Sentry.
The way to achieve this is to use a span_filter that allows all spans, paired with a traces_sampler that inspects the current span and computes an appropriate sampling rate (i.e. 0.0 for discard or 1.0 for include).
Activity
Swatinem commentedon Sep 28, 2023
I don’t think this is currently possible. Other members of the team are prototyping ways to rewamp the performance monitoring / tracing APIs to make such things easier in the future, but it is still very early in that process.
samscott89 commentedon Sep 29, 2023
Cool, looking forward to seeing what happens there. Let me know if you want any feedback/testers, we'd be open to trying stuff out.
tsionyx commentedon Dec 2, 2023
Hello. I just made the implementation of this feature. Would be glad if someone look at it and maybe suggest some improvements.
thomaseizinger commentedon Nov 20, 2024
Unfortuantely, this feature appears to be tied to a
span_filterthat records the span which in turn might spam many spans to Sentry's Tracing feature. It would be great if we can record fields from spans in breadcrumbs while at the same time, only submit certain spans to Sentry.Could we move the sampling of the span to the
finishpart? i.e. record it locally to ensure it is active when events try to extract fields for breadcrumbs and the sampling simply prevents it from being sent to Sentry?thomaseizinger commentedon Nov 29, 2024
The way to achieve this is to use a
span_filterthat allows all spans, paired with atraces_samplerthat inspects the current span and computes an appropriate sampling rate (i.e. 0.0 for discard or 1.0 for include).