OTEL-014: memory_limiter should be first processor in pipeline
Severity: warn (advisory)
Rule Details
The whole point of memory_limiter is to refuse new work when the Collector is already over its soft limit. If processors that allocate (transform, attributes, tail_sampling) run before the limiter, they have already spent memory by the time the limiter kicks in — defeating the back-pressure. Put memory_limiter first so it rejects early.
This rule fires when a pipeline contains memory_limiter and it is not the first processor.
Options
This rule has no options.
Examples
Avoid
service:
pipelines:
traces:
receivers: [otlp]
processors: [attributes, memory_limiter, batch] # memory_limiter not first
exporters: [otlp/backend]
Prefer
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, attributes, batch]
exporters: [otlp/backend]
When Not To Use It
There is no sane exception — if memory_limiter is in the pipeline at all, it should be first.
Related Rules
- OTEL-001 —
memory_limiterprocessor must be configured - OTEL-002 —
memory_limitermust be included in every pipeline - OTEL-013 —
batchprocessor should be last in pipeline
Version
Available since augur v0.1.0.
Further Reading
Resources
- Rule source:
policy/main/main.rego