-
Notifications
You must be signed in to change notification settings - Fork 385
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
fix: jaeger collector only works in batch mode #706
Conversation
|
Codecov Report
@@ Coverage Diff @@
## main #706 +/- ##
==========================================
+ Coverage 71.36% 71.38% +0.01%
==========================================
Files 101 101
Lines 8557 8557
==========================================
+ Hits 6107 6108 +1
+ Misses 2450 2449 -1
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.
Good catch! And yes we probably need to use sync mode in HTTP clients if that's available.
I believe we also need to add #[tokio::main]
on top of the main function and make it async for it to works.
Thanks! However, it seems other parts of this docs don't add opentelemetry-rust/opentelemetry-jaeger/src/lib.rs Lines 136 to 151 in 5972c5d
As those examples won't run in doctests, I think it's reasonable to ignore things like |
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.
LGTM. Thanks
The docs is misleading for jaeger HTTP collector mode --
install_simple
will always initialize a UDP client even if users have configured to use HTTP collector.In
install_simple
, we calledbuild_simple
.opentelemetry-rust/opentelemetry-jaeger/src/exporter/mod.rs
Lines 324 to 333 in 605d6c0
In
build_simple
, we calledinit_sync_exporter_with_process
.opentelemetry-rust/opentelemetry-jaeger/src/exporter/mod.rs
Lines 405 to 413 in 605d6c0
In that, we calls
init_sync_uploader
.opentelemetry-rust/opentelemetry-jaeger/src/exporter/mod.rs
Lines 439 to 448 in 605d6c0
... which ignores the HTTP collector settings and will only create a UDP socket.
opentelemetry-rust/opentelemetry-jaeger/src/exporter/mod.rs
Lines 477 to 485 in 605d6c0
In the future, we should warn users or force use reqwest / isahc sync mode here. But for now, I think it's a quick fix to simply change the docs and prevent readers to mis-configure their clients.
Thanks for review!