Behavior of OpenTelemetry Collector batch processor flush during shutdown with limited timeout
0 reputation · 03 May 2026, 01:41 UTC
Goal: ensure that when the OpenTelemetry Collector receives a shutdown signal, all spans and metrics held in the batch processor are exported without loss.
Constraints: the batch processor flushes its queue on shutdown but only for a configurable timeout; if the timeout expires before the queue is drained, remaining items may be dropped. Meanwhile, the processor retries transient failures with exponential backoff and jitter, and the OTLP exporter offers at‑least‑once delivery.
Uncertainty: it is not fully documented whether items that remain queued after the timeout are simply discarded or can be persisted via the storage extension for later retry, and how the shutdown timeout interacts with the maximum retry backoff interval to affect potential data loss.
What happens to batches that are still in flight when the shutdown timeout expires?
Does enabling the storage extension guarantee that queued items are persisted and retried after restart, regardless of the shutdown timeout?
How should the shutdown timeout be sized relative to the maximum retry backoff interval to minimize loss?