Use it when telemetry is delayed or dropped during spikes or backend outages.
Backpressure and Buffering
Backpressure is how a pipeline reacts when downstream is slower: buffers/queues absorb bursts (memory or disk), then the pipeline slows senders or drops data.
1. Queue metrics: otelcol_exporter_queue_size vs otelcol_exporter_queue_capacity.
2. Drops: otelcol_exporter_enqueue_failed_*, Fluent Bit retries.
3. memory_limiter refusing data?
4. Persistent queue configured (file_storage).
5. Backend capacity.
burst/outage → queue fills → backpressure → retry or drop
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 How to verify Verify boundary
Simulate a backend outage in a test and confirm data is buffered and delivered afterwards. Alert on queue fill above a threshold.
Step 2 Common failures Narrow the fault
Unbounded memory queues crash the collector. Retrying forever blocks newer data. Drops at one stage are invisible if only the final backend is monitored.
Size queues for expected outage duration. Persistent (disk) queues survive restarts. Decide which data may be dropped first.
otelcol_exporter_queue_size— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
ReferenceWhat it is1 section · depth on demand
How it works
When the backend slows or rejects data, exporters retry and queues fill. memory_limiter processors refuse new data to protect the collector. Upstream senders then retry or drop.
ReferenceImportant terms & boundaries3 sections · depth on demand
Handling backpressure
| Component | Setting |
|---|---|
| OpenTelemetry Collector | memory_limiter processor, sending_queue with persistent storage, retry_on_failure |
| Fluent Bit | storage.type filesystem, Mem_Buf_Limit |
| Vector | Disk buffers, when_full: block or drop_newest |
Decide per data type whether to block (logs for audit) or drop (high-volume debug). Monitor queue size and dropped counters (otelcol_exporter_send_failed_*, otelcol_processor_refused_*).
In depth
Where data waits when the backend is slow
app SDK queue → [network] → collector receiver → memory_limiter → batch → exporter sending_queue → [network] → backend
Every arrow is a place where data either waits (buffer) or is refused (backpressure). A pipeline is only as safe as its smallest unmonitored buffer.
OpenTelemetry Collector settings that matter
processors:
memory_limiter: { check_interval: 1s, limit_percentage: 80, spike_limit_percentage: 20 }
exporters:
otlp/backend:
endpoint: backend:4317
sending_queue:
enabled: true
num_consumers: 10
queue_size: 5000 # batches (or items, depending on version/config)
storage: file_storage # persist across restarts
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s # give up after 5 min of retries
extensions:
file_storage: { directory: /var/lib/otelcol/queue }
memory_limitermakes receivers refuse data (clients get a retryable error) instead of the collector being OOM-killed.- A persistent queue survives collector restarts; an in-memory queue loses its contents.
max_elapsed_timebounds how long one batch is retried, so old data does not block new data forever.
Sizing a buffer
Buffer needed ≈ ingest rate × longest outage to ride out. 20,000 spans/s for a 10-minute backend outage is 12 million spans; at roughly 1 KB each that is ~12 GB of disk queue. If that is too much, decide in advance what to drop first (debug logs, sampled traces) rather than losing everything.
Signals to alert on
otelcol_exporter_queue_size / otelcol_exporter_queue_capacity > 0.8
rate(otelcol_exporter_enqueue_failed_spans_total[5m]) > 0
rate(otelcol_receiver_refused_spans_total[5m]) > 0
Metric names vary slightly by collector version; check the collector's own /metrics output for the exact names.
Common mistakes
- Unbounded buffers causing memory exhaustion.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.