Collector resiliency

  • Locate exporter acknowledgement, persistent storage, retry and the boundary where data can be lost.
100%
One Collector replicaExporter persistence belongs to one gateway replicaTelemetry transferFailure or refusalRead or write stateexportenqueuewrite / recoverdequeueOTLPqueue fullUpstreamagent or SDKOTLP receivertraces pipelineExportersending queueRetained volumeone replicaExport workerstimeout + retryEnqueue refusalor data lossBackendingestionexportenqueuewrite / recoverdequeueOTLPqueue full

Select a component to trace its direct connections. Drag to pan · Ctrl + wheel or pinch to zoom.

  • This map follows one Collector while its backend is unavailable. The sending queue holds export requests. A worker takes a request from the queue and retries temporary send failures.
  • Once a request is on the retained volume, a restarted replica can resume delivery from that volume. Telemetry still buffered inside an application has yet to reach this recovery point.
  • At 40 arriving requests per second, a two-minute outage creates a backlog of 4,800. If the backend then accepts 100 per second while arrivals continue, clearing the backlog takes about 80 seconds.
  • Each exporter accepts a bounded amount of work. Its local spool belongs to one replica and must remain available for recovery.
  • A successful enqueue, a successful backend request and a queryable record are different acknowledgements.
Exporter queue capacity and recovery

Exporter queue capacity and recovery

OpenTelemetry Collector Contrib 0.136.0

Locate the persistence boundary

  • The file_storage extension backs one exporter queue on a writable volume. Give each replica an independent directory. Preserve both that storage and the exporter identity when restarting the replica.
  • This pipeline omits a batch processor before the queue so the example has a clear acceptance boundary. A different pipeline can buffer in the SDK or a processor before the persistent queue sees the data.
  • With wait_for_result=false the exporter can report successful enqueue before the remote backend accepts a request. A lost reply during a retry can produce duplicate ingestion.
  • Set OTEL_QUEUE_DIR to the retained mount. Validate capacity, I/O latency, access rights, encryption at rest and cleanup. fsync adds write cost. A full, inaccessible or lost backing volume affects new and retained data.
Persist an exporter queue across restartsyaml
# Collector Contrib 0.136.0. Supply a writable, persistent directory
# dedicated to this replica. Keep its exporter identity on restart.
extensions:
  file_storage:
    directory: ${env:OTEL_QUEUE_DIR}
    create_directory: true
    fsync: true
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 127.0.0.1:4317
exporters:
  otlp/store:
    endpoint: trace-a.example.invalid:4317
    timeout: 5s
    sending_queue:
      enabled: true
      storage: file_storage
      sizer: requests
      queue_size: 6000
      num_consumers: 4
      block_on_overflow: false
      wait_for_result: false
    retry_on_failure:
      enabled: true
      initial_interval: 1s
      max_interval: 10s
      max_elapsed_time: 5m
service:
  extensions: [file_storage]
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [otlp/store]

Size one replica during an outage

Assumption Worked value Consequence
Arrival rate and steady payload 40 requests/s × 64 KiB Queue size counts requests. Byte cost changes with payload size.
Complete downstream outage 120 s × 40/s 4,800 requests accumulate, roughly 300 MiB of payload before overhead.
Initially free queue 6,000 requests Fills in about 150 s at that arrival rate with zero successful sends.
Accepted rate after recovery 100/s accepted minus 40/s arriving Net drain is 60/s. The 4,800-request backlog takes about 80 s to clear.
  • The illustration excludes retries, in-flight consumers, disk metadata and rate variation. At 40/s accepted, backlog stays flat. Extra Collector replicas can amplify pressure when the backend is already saturated.
One replica during a two-minute outagejson
{
  "unit": "export requests per Collector replica",
  "description": "Illustrative fluid model with initially empty queue, uniform payload size and constant rates. Ignores in-flight requests, retries and storage overhead.",
  "capacityRequests": 6000,
  "arrivalsPerSecond": 40,
  "outageSeconds": 120,
  "averagePayloadKiB": 64,
  "recoveredAcceptancePerSecond": 100,
  "backlogRequests": 4800,
  "estimatedPayloadMiB": 300,
  "timeToFillSeconds": 150,
  "timeToDrainSeconds": 80
}

Distinguish loss and backpressure

Event Outcome in this configuration Decision to verify
Queue full, block_on_overflow=false Enqueue can fail immediately. A retryable response can move pressure to the upstream sender. Check exporter enqueue failures, SDK retry limits and producer drops.
Persistent volume survives restart The same exporter can resume queued records on that volume. Open tail-sampler traces or unsent SDK batches have different lifetimes. Verify storage identity, pending size and continued drain.
Non-retryable backend error or retry budget exhausted That export can be discarded. A 5-minute retry budget applies to a request under retry, independently of time spent waiting in the queue. Track final send failures separately from refused/failed enqueues.
Backlog grows across a whole region One replica’s spool serves its own exporter. A broker can supply an independently retained stream and separate consumer groups, at additional operational, privacy and retention cost.