Skip to content

Commit a18b5ca

Browse files
fix: reqwest must use blocking client since opentelemetry 0.28 (#220)
I was getting in my local and deployed testing: ``` thread 'OpenTelemetry.Traces.BatchProcessor' panicked at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/ops/function.rs:250:5: there is no reactor running, must be called from the context of a Tokio 1.x runtime ``` Checking some searches and other Github discussions, I found [this bug](open-telemetry/opentelemetry-rust#2673) which linked [this doc section](https://github.com/open-telemetry/opentelemetry-rust/blob/main/docs/migration_0.28.md#async-runtime-requirements-removed). It seems only the blocking reqwest client is supported by otlp now. This seems to fix it on my local.
1 parent 10af282 commit a18b5ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init-tracing-opentelemetry/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ tracing-subscriber = { version = "0.3", default-features = false, features = [
6161
jaeger = ["dep:opentelemetry-jaeger-propagator"]
6262
otlp = [
6363
"opentelemetry-otlp/http-proto",
64-
"opentelemetry-otlp/reqwest-client",
64+
"opentelemetry-otlp/reqwest-blocking-client",
6565
"opentelemetry-otlp/reqwest-rustls",
6666
"tracer",
6767
]

0 commit comments

Comments
 (0)