-
Notifications
You must be signed in to change notification settings - Fork 262
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
Add a root span to the client #1447
Conversation
#[instrument(skip_all, parent = &self.root_span)] | ||
pub async fn sync_with_callback<C>( |
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.
This is a method that gets called from other sync methods. Using parent =
here will make that relation invisible in logs, right?
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.
It's called from the sync()
method, which doesn't create a span itself.
One of the problems here is that our root span ~never gets uploaded. My comment that we can drop the span and get it emitted is false. The spans end up in a neat tree, but the root one is missing and there are warnings about an invalid parent id. This seems to be related: open-telemetry/opentelemetry-rust#888. |
7e9187e
to
12d7a7f
Compare
9bd402a
to
3589ba6
Compare
This PR proved that we want to have a root span, though I don't think a library should create root spans. What we instead want is to let EX create a root span and have that either be automatically propagated over the FFI or let the Will happen in a different PR. |
da28114
to
bef9243
Compare
Codecov ReportBase: 74.43% // Head: 74.54% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1447 +/- ##
==========================================
+ Coverage 74.43% 74.54% +0.10%
==========================================
Files 124 124
Lines 13841 13881 +40
==========================================
+ Hits 10303 10348 +45
+ Misses 3538 3533 -5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This allows us to have a nice single tree view of the whole client run instead of having traces scattered around:
Not all methods have been handled, and for some methods we would need to apply the root as a parent only if there isn't a previous parent, but this should be a good start.
Requires: #1446