OpenTelemetry Collector reliability: internal mechanisms and durability trade-offs
BuildGuide19 min read

OpenTelemetry Collector reliability: internal mechanisms and durability trade-offs

By Nicolas Narbais

How memory_limiter, exporter batching, sending_queue, and retry_on_failure actually behave inside the OpenTelemetry Collector, and when HA gateways, persistent queues, or Kafka are worth their operational cost.

Last updated on

The Collector queue hits 90%. Someone proposes more memory. Someone else proposes more replicas. Both can be right, and both can also turn a slow backend into a faster way to lose telemetry.

Reliability in the OpenTelemetry Collector is not a single YAML flag. It is a chain of four internal mechanisms (memory guardrails, batching, queuing, and retries), each with an explicit drop condition and a specific cost. This guide walks through how those mechanisms actually behave inside the Collector and which durability tier is worth its operational cost.

Note

Pinned versions: The configuration and implementation references below target OpenTelemetry Collector v0.166.0 and Helm chart v0.183.2. The examples are starting points to validate against your workload, not measured outage guarantees. Pin your own release too: internal telemetry metrics and exporter-helper behavior evolve between minor versions.


Inside the Collector: the four mechanisms that decide whether data survives

Before looking at reliability knobs, orient yourself on the three stages every Collector pipeline runs in order:

  • Receiver (the front door): accepts telemetry from apps, agents, or log files (for example otlp or filelog) and pushes it into the pipeline.
  • Processors (the assembly line): run sequentially in memory to protect the Collector (memory_limiter), enrich metadata (k8sattributes), rewrite or redact fields (transform), or drop noise (filter).
  • Exporter (the shipping dock): buffers, batches, retries, and ships telemetry to your backend (for example otlp_grpc). Almost all outbound reliability machinery lives inside the exporter.

Here is how a batch moves across those three stages, and every point where it can be pushed back, buffered, retried, or dropped:

flowchart LR UP[App SDK / Agent] --> R subgraph REC["1. Receiver (front door)"] R["Accept telemetry (OTLP, filelog...)"] end subgraph PROC["2. Processors (in-memory pipeline)"] ML["memory_limiter (Go heap guard)"] P["Other processors (transform, filter...)"] ML --> P end subgraph EXP["3. Exporter (shipping dock)"] Q["sending_queue + batch (outbound buffer)"] W["Worker pool (num_consumers) + retry_on_failure + timeout"] Q -->|"worker pulls batch"| W W -->|"temporary error: backoff & retry"| W end R --> ML ML -.->|"over soft limit: refuse"| R R -.->|"refusal: upstream must retry"| UP P --> Q Q -.->|"queue full & block_on_overflow=false (default)"| EF(("REJECT: enqueue_failed_*")) Q -.->|"queue full & block_on_overflow=true: caller waits"| P W -->|"successful export: sent_*"| B[(Backend)] W -.->|"permanent error or max_elapsed_time"| SF(("EXPORT FAILED: send_failed_*"))

This diagram shows an OTLP push pipeline using exporterhelper. Other exporters can use different buffering and retry mechanisms. GOMEMLIMIT controls the Go runtime across the process; it is not a pipeline component. In v0.166.0, batch remains beta. Upstream describes migration toward exporter-level batching and the queue_batch processor, which mechanism 2 covers.

1. Memory guardrails: memory_limiter and GOMEMLIMIT

Purpose: Reduce OOMKill risk. Queues and in-flight requests can grow during traffic spikes or backend stalls. memory_limiter refuses new pipeline work when Go heap usage crosses its thresholds; GOMEMLIMIT adjusts runtime garbage collection. Neither guarantees a container memory ceiling: allocations between checks, live data and memory outside the Go runtime can still cause an OOMKill.

Keep one catch in mind: memory_limiter protects the process, not the data. Upstream warns that “data will be permanently lost if the component preceding the memory limiter in the telemetry pipeline does not correctly retry.” An OTLP SDK can retry refusals within its own retry and buffering limits. filelog pauses reading and retries the refused batch only with retry_on_failure.enabled: true; that receiver option defaults to false. Its default retry budget is 5m, after which it discards the batch. UDP inputs and senders without retry support cannot recover a refusal.

Best practices:

  • Put memory_limiter first in every pipeline. Placing it after transform, k8sattributes, or other heavy processors means you only reject data after already spending the memory to process it.
  • Set GOMEMLIMIT with headroom below the container limit. Around 80% is a starting point, not a guarantee. Coordinate it with the limiter thresholds and account for memory outside the Go runtime; measure under load.
  • Declare an explicit Kubernetes resources.limits.memory. Without a cgroup memory limit on Linux, memory_limiter.limit_percentage can use host RAM and choose thresholds far too large for your intended pod budget. An explicit GOMEMLIMIT still works without a cgroup limit; Go applies it to runtime-managed memory. It is a soft limit, separate from Kubernetes enforcement.
Optional deep dive: Why there are soft and hard limits (read if tuning spikes or debugging OOMs)

memory_limiter does not inspect every span; it polls process heap usage on a timer (check_interval, recommended 1s). Two thresholds give you braking distance between timer ticks and separate the cheap defense from the expensive one:

  • Soft limit (hard_limit - spike_limit): The braking line. A burst arriving right after a check can allocate memory before the next check fires, so spike_limit (spike_limit_mib, recommended ~20% of limit_mib, or spike_limit_percentage as a percentage of total container memory) leaves room to stop safely. Crossing the soft limit enters memory-limited mode: incoming batches are refused via ErrDataRefused, otelcol_processor_memory_limiter_refused_* and otelcol_receiver_refused_* increment, and forced GC stays throttled (min_gc_interval_when_soft_limited: 10s) so normal exporting can drain memory without burning CPU.
  • Hard limit (limit_mib or limit_percentage): The emergency wall. If memory keeps rising anyway, the processor keeps refusing data and forces Go garbage collection immediately (min_gc_interval_when_hard_limited: 0s). In v0.166.0, forced GC backs off exponentially (up to 30s) whenever a cycle reclaims less than 5% of memory, preventing fruitless GC spin loops while live references (such as full exporter queues during an outage) pin the heap.

Normal ingestion resumes once heap usage drops back below the soft limit. For example, on a 1000 MiB container with limit_percentage: 80 and spike_limit_percentage: 20:

  • Hard limit: 800 MiB (refuse + immediate forced GC)
  • Soft limit: 800 - 200 = 600 MiB (start refusing at the next check; the 200 MiB margin must cover allocation growth between checks and cannot guarantee that bursts stay below the hard limit)

2. Batching: choose where to build outbound batches

Purpose: Keep high-volume telemetry from overwhelming sending_queue, hitting backend rate limits, or triggering permanent payload-size drops, while also improving compression and cutting connection overhead.

Best practices:

  • Prefer exporter-level batching (sending_queue.batch) when no earlier processor needs batches. In v0.166.0, the standalone batch processor remains beta. The upstream migration RFC describes moving users toward exporter batching or queue_batch; it does not establish a deprecation date for this release.
  • Avoid redundant batching in the same pipeline. Putting a batch processor in front of an exporter with sending_queue.batch enabled triggers a startup warning and double-buffers memory.
  • Set max_size in explicit units. It defaults to 0 (unbounded). An item-count cap splits large batches by record count but cannot guarantee a backend byte limit. Use batch.sizer: bytes when you need serialized-byte sizing, leave protocol headroom and test oversized individual records too.
Optional deep dive: How batching prevents data loss, and how to handle two or more exporters

Why batching directly affects whether data survives:

  1. Reduces request pressure: At 10,000 one-span requests/sec, an unbatched exporter may need 10,000 outbound calls/sec. If workers cannot keep up, the queue fills. Batching combines requests, but the resulting call rate depends on flush timeout, size thresholds, partitions and worker behavior; it is not a fixed 1–2 calls/sec.
  2. Reduces oversized payload failures: Check your destination’s byte limit. An item-count max_size does not bound serialized bytes, and a single large record can exceed a limit by itself. OTLP/HTTP treats 413 Payload Too Large as permanent; gRPC size failures depend on the returned status and retry information. Configure and test against the actual backend.
  3. Bounds your failure blast radius: Too small creates a request storm and queue overflow. Too large holds more memory in flight (risking memory_limiter refusal or OOM), slows sends (risking timeout), and loses more telemetry at once if a pod crashes before flush.

What to configure when a pipeline has two or more exporters:

If a pipeline fans out to two exporters (for example exporters: [otlp_grpc/primary, otlp_grpc/archive]), choose between per-destination batch tuning and shared batching:

  1. Per-exporter sending_queue.batch (each exporter has its own batcher):
    • Each exporter builds and flushes its own batches independently, so you can tune different max_size or flush_timeout values per destination (for example, a strict payload limit on Vendor A and larger compressed batches for Archive B), while each destination drains its own queue. The incoming fan-out call still couples them: a blocking enqueue can delay another destination, and an enqueue error can propagate upstream.
    • Trade-off: Each exporter buffers its own batches, increasing memory use. Upstream retries after partial fan-out success can duplicate telemetry at a destination that already accepted it.
  2. Shared queue_batch processor (one batcher shared by both exporters):
    • Check that your Collector distribution includes queue_batch, then put it in processors: (after memory_limiter and any sampling/filtering) and leave sending_queue.batch disabled (the default) on both exporters.
    • Per upstream’s batching-migration RFC, “when multiple exporters are in use, the processor form uses less memory because the exporters share batched requests.” It is also the right choice when another processor downstream (such as groupbyattrs) needs larger batches before export.
    • Trade-off: Both exporters receive the same batch size. queue_batch defaults to block_on_overflow: true, but also to wait_for_result: false: accepting data into this processor does not acknowledge backend delivery. Fan-out errors and blocking remain shared concerns.
# Option A: Fragment for separate per-destination batch settings
# Sizes below count items; validate serialized payload bytes against each backend.
exporters:
  otlp_grpc/primary:
    endpoint: primary.example.com:4317
    sending_queue:
      batch:
        sizer: items
        flush_timeout: 200ms
        min_size: 4096
        max_size: 8192
  otlp_grpc/archive:
    endpoint: archive.example.com:4317
    sending_queue:
      batch:
        sizer: items
        flush_timeout: 1s
        min_size: 16384
        max_size: 32768

# Option B: Shared batching before fan-out (lower memory, identical batches)
# processors:
#   queue_batch:
#     batch:
#       flush_timeout: 200ms
#       min_size: 8192
#       max_size: 16384
# (leave sending_queue.batch unset on both exporters)

3. The sending queue: sending_queue

Purpose: Decouple pipeline processing from backend latency so brief traffic spikes or slowdowns do not immediately drop telemetry. Think of it as an outbound waiting room inside the exporter (default: queue_size: 1000, drained by num_consumers: 10 background workers). Every exporter gets its own queue per signal: wiring one otlp_grpc exporter into traces, metrics, and logs creates three separate queues of queue_size each, with three separate worker pools.

Keep the fundamental limit in mind: a queue buys time, not throughput. If egress is permanently slower than ingress, a larger queue only delays the drop.

Best practices:

  • Always state an explicit sizer alongside queue_size. Never copy a queue_size number without knowing whether it counts batches (requests), individual records (items), or serialized bytes.
  • Choose overflow behavior for your upstream clients. With block_on_overflow: false (default), a full queue rejects the enqueue and returns an error before exporter retries run. Loss depends on whether the preceding components propagate and retry that error. With true, callers wait for space or cancellation, holding requests in memory. Neither choice guarantees isolation: fan-out errors can trigger upstream retries and duplicates, while blocked calls can delay healthy destinations and increase process-wide memory pressure.
  • Raise num_consumers only after checking the backend. Adding workers against an already saturated destination increases concurrency pressure without speeding up drains.
Optional deep dive: sizer units, block_on_overflow, and wait_for_result
  • sizer (requests | items | bytes, default: requests): requests counts incoming batches and is the fastest option, but queue_size: 1000 in requests holds 1,000 arbitrary-sized batches whereas 1000 in items holds 1,000 individual spans, metric points, or log records (orders of magnitude less runway). Use items to bound record count, or bytes to bound queued serialized payload size at extra serialization cost. Neither bounds total process memory: decoded objects, batch buffers, workers and blocked callers add overhead.
  • block_on_overflow (default: false): With false, a full queue rejects immediately (enqueue_failed_*) and returns a retryable error back up the pipeline without ever reaching retry_on_failure; unless the upstream client retries, the data is dropped. With true, the exporter pauses the incoming pipeline request (all the way back to the receiver) until space opens or the request times out. That slows down upstream senders instead of dropping immediately, but those paused requests sit in RAM and can trigger memory_limiter (affecting healthy exporters sharing the same Collector) or cause client timeouts.
  • wait_for_result (default: false): Normally, enqueueing returns success to the receiver as soon as the batch enters the queue. Setting wait_for_result: true holds the incoming pipeline request open until the background worker finishes exporting, tying upstream request latency directly to backend health. It is not supported when persistent storage is configured.

4. Retries and timeouts: retry_on_failure and timeout

Purpose: Retry transient network failures and retryable backend responses, while capping how long a stalled backend connection can hang an export worker (timeout).

Best practices:

  • Set retry lifetime and queue capacity together. retry_on_failure.enabled defaults to true, with max_elapsed_time: 300s. That budget starts when a worker begins sending, not at enqueue time. Use a finite budget when you accept expiry; max_elapsed_time: 0 keeps retryable batches alive until success or shutdown, but can occupy every worker during an outage. Persistent storage does not override retry expiry or permanent-error handling.
  • Set timeout above your backend’s normal slow-request tail. The default is 5s per attempt. A too-tight timeout cancels healthy slow exports, triggers unnecessary retries, and can create duplicate telemetry.
  • Distinguish retryable statuses from permanent rejection. OTLP/HTTP retries 429, 502, 503 and 504; it treats other HTTP failures, including 400, 401, 403, 413 and 500, as permanent. A blanket rule for all 4xx or all 5xx responses is wrong. gRPC uses its own status classification.
Optional deep dive: Backoff defaults and the worker-pinning trade-off

Each export attempt runs under timeout (default 5s). On a retryable error (HTTP 429, 502, 503, 504, or gRPC statuses such as Unavailable and DeadlineExceeded), retry_on_failure retries with exponential backoff: initial_interval: 5s, multiplier: 1.5, max_interval: 30s, up to max_elapsed_time: 300s.

The hidden trade-off: Each retrying batch holds one of your num_consumers worker slots for the entire backoff window (visible in otelcol_exporter_in_flight_requests). If a backend stalls for 60 seconds and all 10 consumers enter backoff, queue draining stops dead until a slot frees up. Stretching max_elapsed_time keeps batches alive longer during an outage and retains their memory or disk state. After recovery, workers resume on their next attempt; backoff can delay that attempt. Sustained recovery requires export throughput above ingress.

How the exporter actually counts drops

With the queue and retry loop in mind, one metric behavior inside the exporter catches most teams off guard: with the default wait_for_result: false, enqueue_failed_* fires at the queue door (before retries ever run), whereas sent_* and send_failed_* wrap the entire retry loop (exporterhelper/internal/base_exporter.go in v0.166.0) rather than ticking once per failed HTTP/gRPC attempt.

Trace one batch of 100 spans pulled by a worker:

  • 15-second backend hiccup: The worker grabs the batch (in_flight_requests +1). Attempt 1 and Attempt 2 both hit 503 and enter retry backoff; send_failed_spans stays 0 the entire time. Attempt 3 returns 200 OK, in_flight_requests drops -1, and sent_spans jumps +100.
  • Retry budget exhausted (max_elapsed_time, default 300s) or permanent rejection such as HTTP 401: The retry loop returns failure. Only then does in_flight_requests drop -1 and send_failed_spans jump +100. The error.permanent attribute describes the underlying error: retry exhaustion can leave it false. A Prometheus reader may expose that attribute as error_permanent.
  • Operational takeaway: While retries are still trying to save your data, send_failed_* stays silent (watch queue_size and in_flight_requests instead). When send_failed_* increments, this exporter operation has stopped retrying. With the default asynchronous queue, no upstream caller remains waiting to recover the failed batch. With synchronous error propagation, an upstream component may still retry. A failure also does not prove the backend received nothing: a lost acknowledgement can lead to duplicates. OTLP partial-success responses need separate attention because the exporter can log rejected records while returning success.

A stateless baseline to load-test (v0.166.0)

This trace pipeline is a starting point. Set the destination and Kubernetes memory limit, configure GOMEMLIMIT in the pod environment, and load-test the queue and batch sizes before production. The receiver binds to localhost for a same-pod sender; choose a reachable interface and network controls for remote clients.

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 127.0.0.1:4317

processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80        # Requires Kubernetes resources.limits.memory!
    spike_limit_percentage: 20

exporters:
  otlp_grpc:
    endpoint: backend.example.com:4317
    timeout: 10s
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      max_interval: 30s
      max_elapsed_time: 300s
    sending_queue:
      enabled: true
      num_consumers: 10
      sizer: items
      queue_size: 100000        # Bound by item count, not ambiguous batch count
      block_on_overflow: false  # Upstream must retry rejected enqueues
      batch:
        flush_timeout: 200ms
        sizer: items             # Item count does not bound payload bytes
        min_size: 8192
        max_size: 16384

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [memory_limiter]
      exporters: [otlp_grpc]

Reliability options and their trade-offs

You cannot eliminate data loss; you can only choose which failure modes you pay to survive. Each option covers different failures at a cost in memory, disk IOPS or distributed-system operations.

Reliability tierSurvivesStill losesOperational costWhen to choose it
1. Tuned stateless Collector (single tier) (limits + GOMEMLIMIT + memory_limiter + in-memory queue)Spikes and retryable backend blips within queue and retry budgetsQueued data on abrupt process/pod loss; overflow; retry expiryLow (Deployment or DaemonSet)Starting point when restart loss is acceptable
2. Collector Gateway: HA replicas + load balancingContinued intake after a replica failure, with spare capacity and sender reconnect/retry supportThe failed replica’s in-memory backlog; backend outagesLow to medium (replicas across failure domains + L7 or client-side gRPC balancing)Gateway availability requirements
3. Two-tier Agent -> GatewayAgent buffering during gateway disruption, within agent capacity and retry limitsData already acknowledged into a failed gateway’s memory; agent loss; overflow or expiryMedium to high (another serialization hop, possible cross-AZ traffic, two fleets)Local collection plus central processing or operational isolation
4. Persistent queue (file_storage)Recovery of persisted queue state after restart when storage survivesStorage loss; overflow; retry expiry; permanent errors; unsynced writes after a hard crashMedium to high (durable volumes, IOPS, capacity and compaction)Restart loss is unacceptable
5. External broker (Kafka / Redpanda between tiers)Retained data during backend or consumer-fleet outages, with suitable producer acknowledgements and consumer commit semanticsRetention expiry; broker/storage failure; data acknowledged before backend delivery without another durable handoffHigh (broker operations, latency, replication and storage)Replay, long buffers or multiple independent consumers

These options can be combined. HA improves availability; persistence protects buffered data. Size an outage buffer from usable queue capacity and measured ingress in matching units. During a complete backend outage, capacity / ingress_rate estimates time to fill an empty queue. Worker retry expiry is a separate limit, and recovery needs spare drain throughput.

Where most teams overbuild, and where they underbuild

For most production setups, stay single-tier (Tier 1 + Tier 2) until you hit a concrete reason to split. A DaemonSet sending to your backend, or an HA Gateway with appropriate load balancing, can cover spikes and backend blips within measured queue and retry budgets (see the Kubernetes OpenTelemetry topology guide for how to lay out node and cluster Collectors cleanly). Replicas keep intake available during restarts; they do not recover another pod’s in-memory backlog. Choose replica count, placement and spare capacity from the failure domains you need to tolerate.

Teams routinely adopt Tier 3 (Agent -> Gateway) out of habit because it is the textbook OTel diagram, without pricing its real cost: the extra OTLP hop adds decoding and encoding work, cross-AZ traffic between Agents and Gateways can add network charges, and you now operate two Collector fleets, two upgrade cycles, and two places where data can silently drop. Pay that cost only when you actually need one of three things:

  • Stateful or centralized processing: tail_sampling, central egress credentials/PII redaction, or cutting k8sattributes Kubernetes API watch load on large clusters.
  • Failure-domain isolation: you already run a DaemonSet for filelog or hostmetrics and want heavy transform rules or frequent config changes moved off the node agent.
  • An SDK shock absorber: in a single-tier App SDK -> Gateway setup, a bad Gateway rollout leaves only the app SDK’s bounded queue (the standard batch span processor default is 2,048 spans) to buffer telemetry; adding a local node Agent (App SDK -> Local Agent -> Gateway) can absorb the backlog until the Gateway recovers, within the Agent’s queue and retry budgets. It cannot recover records that a Gateway already acknowledged into memory before crashing.

If you do move up the ladder, two operational traps show up immediately:

Trap A: Adding file_storage persistent queues without operating the disk

Setting sending_queue.storage: file_storage replaces the in-memory queue with a disk-backed bbolt database (otelcol-contrib or otelcol-k8s) so queued batches resume exporting after a restart. It turns a stateless Collector into a stateful disk workload; plan volume ownership, capacity, write durability and compaction before enabling it.

Optional deep dive: Five file_storage gotchas and a configuration fragment
  • Pod recreation needs persistent storage. emptyDir can survive a container restart within the same pod, but pod deletion removes it. Use a persistent volume when the queue must survive pod recreation, and ensure a replacement Collector reopens its own queue. A StatefulSet with per-replica PVCs is a common approach, not a requirement. Do not let replicas write to the same database.
  • A drained queue can leave a large database file. bbolt retains allocated file space for reuse and accesses it through mmap(). Mapped size is not resident RAM: resident file-backed pages can contribute to container memory accounting, while memory_limiter checks Go heap allocation and does not measure these mappings. Enable rebound compaction when you need to reclaim disk space, and monitor container memory separately from Go heap.
  • Budget the whole volume. file_storage.max_size caps each database file, not the total PVC. Multiple exporter/signal queues can create multiple files. Leave headroom for their combined growth, compaction copies and other files. Storage-full or I/O errors can reject enqueues; monitor disk space and enqueue_failed_*.
  • Hard-crash safety vs write speed (fsync). With the default fsync: false, Linux buffers disk writes in memory before flushing them to the SSD; that is fast and survives normal pod restarts, but a hard node crash or power loss mid-write can corrupt the bbolt file. Setting fsync: true requests a filesystem sync after each database write, improving hard-crash durability at a throughput and IOPS cost. It cannot guarantee integrity against storage failure; test the behavior of your volume and filesystem.
  • Per-request auth context is not saved to disk. Static credentials configured on your exporter (such as a fixed API key header) keep working normally. What gets dropped is dynamic per-request authentication attached by an auth extension (for example, per-tenant tokens forwarded across Collector-to-Collector hops): file_storage does not serialize that auth context to disk, so replayed batches can fail with 401/403.

This fragment configures a per-file ceiling and compaction. Mount persistent storage at the directory, budget for all queue files and compaction space, and add the receiver and pipeline from your full configuration:

extensions:
  file_storage/queue:
    directory: /var/lib/otelcol/queue
    create_directory: true
    max_size: 4294967296      # 4 GiB per database file; budget total PVC usage
    fsync: false              # true improves hard-crash durability; measure IOPS
    compaction:
      on_start: true
      on_rebound: true
      rebound_needed_threshold_mib: 256
      rebound_trigger_threshold_mib: 32

exporters:
  otlp_grpc:
    endpoint: backend.example.com:4317
    sending_queue:
      enabled: true
      storage: file_storage/queue
      queue_size: 50000
      sizer: items

service:
  extensions: [file_storage/queue]

Trap B: Adding HA replicas over gRPC without L7 load balancing

OTLP over gRPC runs on persistent HTTP/2 connections. A standard Kubernetes ClusterIP Service load-balances at L4 (per TCP connection), so each app or agent pins its entire stream to a single Gateway pod; existing connections do not redistribute just because you scale from 3 Gateways to 10. New or re-established connections may reach new pods; L7 or client-side balancing can distribute calls across the pool.

Optional deep dive: Fixing gRPC connection pinning and stateful pipelines
  • Spread gRPC streams at L7: Put an L7 load balancer (Envoy or a service mesh) in front of the Gateway Deployment, or expose the Gateway via a Kubernetes headless Service (clusterIP: None) with client-side gRPC round-robin balancing (balancer_name: round_robin on upstream Collector exporters). Alternatively, OTLP over HTTP/1.1 or HTTP/2 behind an L7 ingress balances per request.
  • DaemonSets do not need an ingress L7 LB: When apps talk only to their local node’s DaemonSet Collector, there is no gateway pool in front to balance.
  • Stateful processors break naive replication: If your Gateway runs tail_sampling, splitting one trace’s spans across random replicas drops incomplete traces. Put a trace-ID-aware routing tier (loadbalancing exporter) in front of the sampling replicas first.

When Kafka earns its keep

From the ingestion Collector’s point of view, Kafka or Redpanda is just another exporter destination (kafka exporter). What turns it into a reliability buffer is a second Collector tier on the other side reading from the broker (kafka receiver) and shipping to your observability backend:

flowchart LR A[Apps] --> C1["Collector 1 (kafka exporter)"] C1 --> K[("Kafka / Redpanda")] K --> C2["Collector 2 (kafka receiver -> otlp exporter)"] C2 --> B[(Observability Backend)]

A broker can retain telemetry during a four-hour backend outage if retention, storage, replication and producer acknowledgements meet that requirement. Collector 1 can keep publishing while broker capacity and throughput permit. Collector 2 resumes from committed offsets, so what allows an offset to commit is the durability boundary.

The Kafka receiver defaults to message_marking.after: false and auto-commit. Even with marking after processing, an asynchronous exporter can return success after enqueueing in RAM, before backend delivery. The receiver may then commit records that the exporter later loses to a crash or retry expiry. A broker alone does not provide end-to-end delivery guarantees.

For a consumer tier that keeps retryable backend failures uncommitted, use message_marking.after: true, retain failed messages (on_error: false), and ensure the pipeline propagates the final export result. One design uses sending_queue.wait_for_result: true without persistent exporter storage and no intervening asynchronous processor. This trades consumer progress for backend acknowledgement. Decide how to handle permanent errors so a bad record does not block a partition forever, and test crashes, rebalances and lost acknowledgements. Replay can produce duplicates.

Scale consumers within the available partition count and backend capacity. Separate consumer groups support independent destinations such as a SIEM or data lake; retention must cover their replay windows too.

Pay for that architecture only when you genuinely need hours of durable buffer, independent replay, or multi-consumer fan-out. If your real requirement is surviving a 2-minute deploy or a 5-minute vendor hiccup, a broker adds a distributed system you now have to page on at 3 AM.


Next: monitor it before it drops data

Choosing the right internal guardrails and durability tier is half the job. The other half is knowing when your buffer is filling, telling a slow backend apart from an under-sized Collector, catching silent Helm memory_limiter misconfigurations, and proving your config under load before production does.

To start instrumenting Collector self-metrics right away, see the OpenTelemetry Collector Health Implementation Guide. Part 2 of this series will walk through the six monitoring boundaries, ready-to-use PromQL, symptom-to-root-cause triage, and a four-test telemetrygen validation playbook.


Versioned references

Written by

Nicolas Narbais

Nicolas Narbais builds, breaks, debugs, and scales observability systems using OpenTelemetry and modern telemetry pipelines. He shares practical, opinionated lessons to help engineers get better signal with less noise.

Olatuak Editorial Philosophy

Better signal, not more telemetry.

Olatuak helps platform engineers, SREs, and observability teams turn noisy telemetry into clear operational decisions without blindly collecting more data.

Scroll to zoom · Drag to pan · Double-click to reset