Closed
Description
What happened?
A bunch of things changed between reqwest 0.11 and 0.12 and I think one of them might have broken your API. Previously we were setting the blocking client explicitly so we could change the connect timeout, but now we are able to do so. Something shifted with features and paths so that after upgrade we see an error suggesting there isn't an implement for the reqwest Client
. This seems to be so whether we use sync or async:
error[E0277]: the trait bound `Client: opentelemetry_http::HttpClient` is not satisfied
--> src/main.rs:19:39
|
19 | .with_http_client(client)
| ---------------- ^^^^^^ the trait `opentelemetry_http::HttpClient` is not implemented for `Client`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `opentelemetry_http::HttpClient`:
reqwest::async_impl::client::Client
reqwest::blocking::client::Client
note: required by a bound in `HttpExporterBuilder::with_http_client
I assume this is an incompatible change from reqwest, but I'm not sure.
Example code: https://gist.github.com/dsomerfield-vendia/49182b2d2156097cd93eb4fa7ce0f844
API Version
0.23.0
SDK Version
0.23.0
What Exporter(s) are you seeing the problem on?
OTLP
Relevant log output
error[E0277]: the trait bound `Client: opentelemetry_http::HttpClient` is not satisfied
--> src/main.rs:19:39
|
19 | .with_http_client(client)
| ---------------- ^^^^^^ the trait `opentelemetry_http::HttpClient` is not implemented for `Client`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `opentelemetry_http::HttpClient`:
reqwest::async_impl::client::Client
reqwest::blocking::client::Client
note: required by a bound in `HttpExporterBuilder::with_http_client`
--> /Users/danielsomerfield/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opentelemetry-otlp-0.16.0/src/exporter/http/mod.rs:131:32
|
131 | pub fn with_http_client<T: HttpClient + 'static>(mut self, client: T) -> Self {
| ^^^^^^^^^^ required by this bound in `HttpExporterBuilder::with_http_client`