Skip to content

Commit dd5077d

Browse files
fix: datadog otel need blocking client (#403)
* fix: datadog otel need blocking client * fix: comment
1 parent cb293bf commit dd5077d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bins/nittei/src/telemetry.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,10 @@ fn get_sampler() -> Sampler {
201201

202202
/// Get the HTTP client to be used
203203
/// This is used to send traces to the tracing endpoint
204-
fn get_http_client() -> anyhow::Result<reqwest::Client> {
205-
reqwest::Client::builder()
204+
///
205+
/// The exporter runs on a different thread than the main thread, so we need to use a blocking client.
206+
fn get_http_client() -> anyhow::Result<reqwest::blocking::Client> {
207+
reqwest::blocking::Client::builder()
206208
.timeout(Duration::from_secs(10))
207209
.connect_timeout(Duration::from_secs(5))
208210
.build()

0 commit comments

Comments
 (0)