Skip to content

Fix OTLP exporter Tokio runtime usage#6557

Closed
fmassot wants to merge 1 commit into
mainfrom
codex/fix-otlp-exporter-runtime
Closed

Fix OTLP exporter Tokio runtime usage#6557
fmassot wants to merge 1 commit into
mainfrom
codex/fix-otlp-exporter-runtime

Conversation

@fmassot

@fmassot fmassot commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Wrap OTLP trace, log, and metric exporters in a small stable-trait adapter that owns a Tokio runtime for export calls.
  • Keep OpenTelemetry's stable batch processors instead of enabling experimental_async_runtime, experimental_trace_batch_span_processor_with_async_runtime, or experimental_logs_batch_log_processor_with_async_runtime.
  • Make telemetry shutdown best-effort across trace/log/metric providers and run CLI telemetry shutdown on a plain OS thread to avoid dropping Tokio runtimes from a Tokio worker.

Root Cause

OpenTelemetry's stable batch processors export from dedicated OS threads. The OTLP exporters can use Tokio-backed HTTP/gRPC paths internally, which need a Tokio reactor. Without one, the batch processor thread can panic with there is no reactor running, must be called from the context of a Tokio 1.x runtime.

Validation

  • cargo check -p quickwit-telemetry-exporters
  • cargo check -p quickwit-cli

@guilload guilload closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants