-
Notifications
You must be signed in to change notification settings - Fork 502
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
opentelemetry: remove tonic dependency #414
Conversation
Codecov Report
@@ Coverage Diff @@
## master #414 +/- ##
==========================================
- Coverage 48.65% 48.41% -0.24%
==========================================
Files 65 65
Lines 5523 5492 -31
==========================================
- Hits 2687 2659 -28
+ Misses 2836 2833 -3
Continue to review full report at Codecov.
|
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.
Think this was it. Was added for integration convenience to avoid tonic users having to copy this into all their apps I believe, but likely better as external crate or just copy/paste as locking the version here is probably makes the whole thing not worth it.
Good. Shall I get rid of |
Sounds good 👍 |
IMHO we still should provide the tonic integration as the external crates if we can so that it can be used out of the box. Usually, Users would likely want to spend less time on telemetry compared with business logic, which means they should be able to do it with less configuration. |
It's not clear how that would work with the current definition of the |
778d72d
to
eeae0c3
Compare
@djc yeah the names come from the propagators api spec https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/context/api-propagators.md#injectors-and-extractors-as-separate-interfaces, we don't need to have the names match exactly if we can add clarity. The rust naming convention for single method traits seems to be more aligned with the method name like |
I think my point on naming is a little different and potentially orthogonal to what you're saying. The problem that had me a little confused at first is that IIRC Rust traits that are named for a verb can actually "do the thing" (so you can |
Yeah the global propagator is tricky to express. E.g. if an actix-web or rocket middlware crate wants to be able to extract headers for a given app, then it needs a way to find the globally configured propagator so it knows which headers to extract (b3, jaeger, w3c trace context, some combination, etc). Thus the current global method for getting a reference to an impl of the Having the global propagator generically accessible for instrumentation anywhere in the app seems like the challenge for the type system currently. |
See #403. This just moves the code into an example -- I'm not sure what else would be relying on these impls?