opentelemetry-rust
opentelemetry-rust copied to clipboard
[Bug]: The `reqwest` feature also tries to configure `reqwest::blocking::Client` and it might not be available
What happened?
I'm trying to compile a project for WASM runtime (wasm32-unknown-unknown
) and it seems like opentelemetry-http
(loaded by opentelemetry-zipkin
) is trying to implement a trait for reqwest::blocking::Client
but it does not exists for the WASM runtime.
Here is how my dependencies are configured:
opentelemetry-zipkin = { version = "0.19.0", default-features = false, features = [
"reqwest-client",
] }
This is the relevant code:
https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-http/src/lib.rs#L81-L93
And the actual error:
error[E0433]: failed to resolve: could not find `blocking` in `reqwest`
--> /.../opentelemetry-http-0.10.0/src/lib.rs:81:34
|
81 | impl HttpClient for reqwest::blocking::Client {
| ^^^^^^^^ could not find `blocking` in `reqwest`
I get
opentelemetry-http-0.10.0
loaded as a dependency.
I'm not sure if impl HttpClient for reqwest::blocking::Client
should be behind a separate feature flag? I noticed that opentelemetry-zipkin
already have that?
API Version
0.x
SDK Version
opentelemetry-zipkin = { version = "0.19.0", default-features = false, features = [
"reqwest-client",
] }
What Exporters are you seeing the problem on?
Zipkin
Relevant log output
error[E0433]: failed to resolve: could not find `blocking` in `reqwest`
--> /.../opentelemetry-http-0.10.0/src/lib.rs:81:34
|
81 | impl HttpClient for reqwest::blocking::Client {
| ^^^^^^^^ could not find `blocking` in `reqwest`