Interview Prep/Monitoring & Observability/Tracing and OpenTelemetry

Your OpenTelemetry Collector is getting OOMKilled under load. How do you stabilise it?

IntermediateScenarioTracing and OpenTelemetry
Answer

Situation read → No memory limiter, large batches, or a slow exporter causing the queue to grow.

What I'd do →

  1. Add memory_limiter as the first processor in each pipeline:
processors:
  memory_limiter: {check_interval: 1s, limit_percentage: 80, spike_limit_percentage: 20}
  batch: {send_batch_size: 8192, timeout: 5s}
service:
  pipelines:
    traces: {receivers: [otlp], processors: [memory_limiter, batch], exporters: [otlp]}
  1. Set GOMEMLIMIT to about 80% of the container limit.
  2. Configure sending_queue size and optional file storage for persistence.
  3. Scale horizontally with an HPA on CPU/memory.
  4. Monitor otelcol_exporter_queue_size and otelcol_processor_refused_spans.

Why → The memory limiter applies back-pressure instead of crashing and losing everything.

Interview tip → Processor order matters: memory_limiter first, batch last before export.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Tracing and OpenTelemetry