Tune the OpenTelemetry Collector memory_limiter and batch processor for stable high-throughput operation

domain: opentelemetry.io · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Add memory_limiter as the first processor in every pipeline; set limit_mib or limit_percentage (e.g., 80% of container memory limit) and spike_limit_percentage (e.g., 25% of limit) with check_interval: 1s
  2. Set the GOMEMLIMIT environment variable on the Collector to approximately 80% of the hard container memory limit so the Go runtime's GC triggers before the memory limiter's hard limit is breached
  3. Place the batch processor after memory_limiter in the pipeline; configure send_batch_size (e.g., 8192) and timeout (e.g., 10s) — batches are sent when either threshold is reached first
  4. For very high throughput, set send_batch_max_size to cap the maximum batch size and prevent oversized payloads from overwhelming downstream exporters
  5. Monitor otelcol_processor_refused_spans (or the equivalent metric for logs/metrics) to detect when the memory limiter is actively backpressuring; this signals the Collector is under memory pressure
  6. Scale horizontally by deploying additional Collector replicas behind a load balancer rather than increasing per-instance memory limits beyond the point where GC pause latency becomes noticeable

Known gotchas

Related routes

Tune memory_limiter and batch processor order and settings for stable throughput
opentelemetry.io · 6 steps · unrated
Configure the OpenTelemetry Collector tail sampling processor with multiple composite policies for intelligent trace retention
opentelemetry.io · 6 steps · unrated
Configure the OTel Collector probabilistic sampler processor for head-based sampling to reduce trace volume uniformly
opentelemetry.io · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans