-
-
Notifications
You must be signed in to change notification settings - Fork 168
ref(tracing): rework tracing
to Sentry span name/op conversion
#887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #887 +/- ##
==========================================
- Coverage 73.28% 73.23% -0.05%
==========================================
Files 64 64
Lines 7407 7473 +66
==========================================
+ Hits 5428 5473 +45
- Misses 1979 2000 +21 🚀 New features to boost your workflow:
|
Corrected punctuation in the CHANGELOG regarding Sentry span overrides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, this looks a lot cleaner indeed.
I think its fair to use just the function name, from the users perspective, I think that makes sense. Although I also might want to see the fully qualified name sometimes, in particular for method names.
its a bit unfortunate that tracing
does not differentiate between an impl method and a free function here.
Ideally, it should qualify methods with the impl (such as Vec::extend_from_slice
).
I think not qualifying anything could lead to confusion for example if you have str::from_utf8
vs String::from_utf8
, which are two different methods.
But okay, I guess that is a minor annoyance.
Thanks @Swatinem, that's a fair point. |
One thing to try would be whether it actually is the "fully qualified" name, because just concatenating the |
Description
This changes how the
tracing
integration works with regards to span names and operations.(In the analysis below, I assume the spans are all created with the
tracing::instrument
macro)Previous behavior
<module>::<function>
message
field is set, in which case it will determine the Sentry span namemessage
field is arbitrary, not documented, and doesn't align with our conventionsBehavior after this PR
tracing
span name (= function name, when using thetracing::instrument
macro)default
, as we have no way to infer anop
that makes sense - it will be hidden in the UItracing
Subscriber and override values on the corresponding Sentry span:sentry.name
sentry.op
sentry.trace
: while not related to this issue, I noticed that there is confusion on how one would achieve distributed tracing. This makes it possible without having to use the Sentry tracing API and understand the interplay between Sentry and thetracing
crate.Advantages of the change
tracing-opentelemetry
, which offers aotel.name
special propertyDrawbacks of the change
span.metadata.target
into span attributes, like we do for logs to surface function and lineCloses
Close #880
Close #879