Skip to content
New Atlanta
Topics

OpenTelemetry Collector memory limiter

Distinguish receiver backpressure from a growing exporter queue before changing a Collector memory limit.

Published 2 min read
Pipeline placement
First processor
Above the soft limit
Refuse new data
Above the hard limit
Request garbage collection

Where does the memory limiter belong?

Place the memory limiter first in each Collector pipeline that should apply backpressure. The component upstream of it must handle a retryable refusal for telemetry to survive a burst.

Trace the signal from receiver to exporter before adjusting limits. If the upstream source cannot resend, a refusal can become lost telemetry even while the Collector stays available.

What happens at the two limits?

The Collector’s soft memory limit is the hard limit minus the configured spike allowance. Above the soft limit the processor refuses incoming data; above the hard limit it can also force garbage collection.

Memory can rise between two samples. Set the spike allowance with observed burst size in mind and leave room for memory outside the process heap.

Why might forced collection achieve little?

An exporter queue can retain live objects during a downstream outage. Garbage collection cannot release objects that are still referenced, so check exporter health and queue consumption.

How do you verify an adjustment?

Test the Collector with a representative burst and verify that ingestion recovers once pressure falls. Watch source retries, accepted telemetry, queue depth and process memory on the same timeline.

Compare a period before the change with one after it using the same incoming load. If refused data rises while the destination remains slow, address the downstream bottleneck as well as the memory limit.

Methodology and sources

About Nolan Greer
CI/CD, Build Systems & Reliability Editor

Editorial pen name. Covers build performance, release workflows and operational reliability.