In what order should Collector processors run, and why?

AdvancedConceptTracing & OpenTelemetry
Answer

Processors execute in the listed order, so order is a correctness and stability decision.

processors: [memory_limiter, k8sattributes, filter, transform, tail_sampling, batch]
  1. memory_limiter first: it refuses data (returns a retryable error to the sender) before memory is exhausted, so the Collector is not OOMKilled.
  2. Enrichment (k8sattributes, resourcedetection) early, so later filters can use those attributes.
  3. Filtering / dropping before expensive work, so you do not process data you will throw away.
  4. Sampling after enrichment.
  5. batch last: it groups data right before export to cut network calls.
memory_limiter:
  check_interval: 1s
  limit_percentage: 80
  spike_limit_percentage: 20

Pair it with GOMEMLIMIT set near the container limit.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Tracing & OpenTelemetry