From 1ab3b60374f0c2838508afed9c66d51f6a98d027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Mon, 7 Sep 2026 04:46:45 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20OTLP=20over=20HTTP=20expo?= =?UTF-8?q?rts=20from=20the=20SDK's=20own=20threads=20again?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `hyper-client` feature gave every OTLP exporter an HTTP client that calls `tokio::time::timeout`, but the batch span/log processors and the periodic metric reader each run on a plain `std::thread` with no reactor on it. Every export attempt panicked with "there is no reactor running" — the panic hook then logged it and the batch was dropped, so a configured collector received nothing at all from any of the three signals while the process looked healthy. Swap the client to `reqwest-blocking-client`, which carries its own runtime and is the client the sync processors expect. reqwest is pulled with default features off (no extra TLS stack) and was already in the lock file. Verified end to end against a live collector: spans (`GET /health`, `GET unmatched`, `POST /builder/login`), the `http.server.request.duration` histogram and the process's log records all arrive, with no forbidden attribute keys among them. Claude-Session: https://claude.ai/code/session_018sqvyBCZ9kpQP6vnGomT2s --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 412c865..9cf9fad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2707,11 +2707,8 @@ dependencies = [ "async-trait", "bytes", "http", - "http-body-util", - "hyper", - "hyper-util", "opentelemetry", - "tokio", + "reqwest", ] [[package]] @@ -2726,6 +2723,7 @@ dependencies = [ "opentelemetry-proto", "opentelemetry_sdk", "prost", + "reqwest", "thiserror", "tokio", "tonic", @@ -3479,7 +3477,9 @@ dependencies = [ "bytes", "cookie", "cookie_store", + "futures-channel", "futures-core", + "futures-util", "http", "http-body", "http-body-util", diff --git a/Cargo.toml b/Cargo.toml index b6b0982..28a866b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ tracing-opentelemetry = "0.33.0" opentelemetry-semantic-conventions = "0.32.1" uuid = { version = "1.26.0", features = ["v4"] } opentelemetry_sdk = { version = "0.32.1", features = ["rt-tokio"] } -opentelemetry-otlp = { version = "0.32.0", default-features = false, features = ["trace", "metrics", "logs", "grpc-tonic", "http-proto", "hyper-client", "internal-logs"] } +opentelemetry-otlp = { version = "0.32.0", default-features = false, features = ["trace", "metrics", "logs", "grpc-tonic", "http-proto", "reqwest-blocking-client", "internal-logs"] } opentelemetry-appender-tracing = "0.32.0" [dev-dependencies]