Skip to main content

OTEL-039: Transform/attributes processor after batch

Severity: warn (advisory)

Rule Details

transform and attributes mutate individual items — they add resource attributes, rename fields, or redact PII. Running them after batch means the batcher already grouped items based on their pre-transform shape; the downstream exporter then has to unpack and re-serialize those items anyway. Run mutators before batching.

This rule fires when a pipeline contains batch and a transform or attributes processor appearing after it.

Options

This rule has no options.

Examples

Avoid
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch, attributes]
exporters: [otlp/backend]
Prefer
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, attributes, batch]
exporters: [otlp/backend]

When Not To Use It

A transform that only runs on batch-level metadata (rare) can live after batch. In almost every other case, mutators belong before batching.

  • OTEL-013batch processor should be last in pipeline
  • OTEL-038 — filter processor after batch
  • OTEL-043 — batch before tail_sampling/groupbytrace

Version

Available since augur v0.1.0.

Further Reading

Resources