Specialize blocking OTLP/HTTP providers for single-signal export (#63406)

## Why

The code-mode host only exports traces, and Windows sandbox setup only
exports metrics. Selecting the required exporter and HTTP client at compile
time lets the linker drop unused exporter and custom client code.

## What changed

Use `BlockingHttpService` for OTLP/HTTP JSON traces in the code-mode host
and Statsig metrics during Windows sandbox setup. These providers use the
OpenTelemetry SDK's default HTTP client. Traces use the dedicated batch span
processor even inside a Tokio runtime.

Move `codex_home` from `OtelSettings` to `OtelHeadersHelper`, where it
supplies the working directory for user-configured header commands.

## Testing

Exercise the blocking providers in HTTP loopback tests for trace export
inside a current-thread Tokio runtime and cumulative metrics temporality.

GitOrigin-RevId: 21bacbdb18b603f5f536532812ce7643e4eb36d6
This commit is contained in:
Charlie Marsh
2026-11-23 18:44:09 +00:00
committed by copyberry
parent 78fe0c9f23
commit 69477b3a77
20 changed files with 245 additions and 232 deletions
@@ -631,7 +631,6 @@ fn exported_logs(
environment: "test".to_string(),
service_name: "codex-exec-server".to_string(),
service_version: env!("CARGO_PKG_VERSION").to_string(),
codex_home: std::env::current_dir().expect("cwd"),
exporter,
trace_exporter: if export_traces {
OtelExporter::OtlpHttp {