OTEL-042: Duplicate processor in same pipeline
Severity: warn (advisory)
Rule Details
Listing the same processor name twice in a pipeline's processors: list makes it run twice on the same data. For memory_limiter that is harmless; for anything that mutates (attributes, transform, filter, tail_sampling) it doubles side effects and is almost always a copy/paste artifact from a merge conflict or a refactor.
This rule fires when the same processor name appears more than once in a single pipeline's processors: list.
Options
This rule has no options.
Examples
Avoid
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, attributes, attributes, batch]
exporters: [otlp/backend]
Prefer
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, attributes, batch]
exporters: [otlp/backend]
When Not To Use It
A deliberate two-stage transform that legitimately runs the same processor instance twice — very rare. Use differently named instances (attributes/first, attributes/second) instead to make the intent explicit.
Related Rules
Version
Available since augur v0.1.0.
Further Reading
Resources
- Rule source:
policy/main/pipeline.rego