- normalize, tag, and enrich telemetry,
- filter or sample noisy data,
- convert metric temporality,
- batch and optimize traffic to backends,
- and protect the Collector from resource exhaustion.
Processors execute in the order you list them in a pipeline. That order matters: place protective processors (e.g.,
memory_limiter) early, transformation/enrichment processors in the middle, and batching last for export efficiency.Memory Limiter
Protects the Collector from running out of RAM by enforcing soft and spike memory limits, triggering GC and optionally dropping or rejecting data when necessary. Example:Batch
Groups telemetry into larger batches before exporting to reduce network calls and improve compression. Example:Resource Detection
Automatically detects platform and environment metadata (host, cloud, container, etc.) and attaches it as resource attributes. Example:Resource Processor
Modifies or adds resource-level attributes that apply consistently across all signals. Example:Kubernetes Attributes
Enriches telemetry with Kubernetes metadata (pod, namespace, deployment, etc.). Commonly uses the pod service account for authentication. Example:Attributes Processor
Performs insert/update/delete/hash operations on span/log/metric attributes—useful for adding environment tags and removing or masking PII/sensitive fields. Example:Transform (OTTL)
Applies conditional rules using the OpenTelemetry Transformation Language (OTTL) for complex, expression-based changes. Example:Filter
Drops telemetry that matches defined conditions to reduce noise and backend costs. Example:Probabilistic Sampler
Samples a fixed percentage of traces using a deterministic hash of the trace ID. Good for predictable, repeatable sampling. Example:Tail Sampling
Waits until a trace completes, evaluates policies (errors, latency, attributes), and then decides whether to keep or drop the trace. This preserves critical traces that front-loaded samplers might miss. Example:Delta ↔ Cumulative Conversions
Some backends expect cumulative counters, others expect delta metrics. Use temporality conversion processors to adapt metric streams. Delta → Cumulative:Span Processor (Span Refinement)
Span-oriented transformations allow renaming, status setting, and attribute extraction to make span names and statuses more meaningful. Example (rename and set status based on attributes):Processor Order Best Practices
Processor ordering impacts correctness, data quality, and Collector stability. A typical ordering pattern:- memory_limiter — protect the Collector
- attributes / transform — normalize and enrich data
- resourcedetection / k8sattributes — add infrastructure metadata
- batch — prepare data for efficient export
Processor sequence is critical. For example, run
memory_limiter early to protect the Collector; run batch near the end to optimize export behavior. Reordering can change transformations or cause unexpected data loss.
Quick Reference Table
| Processor | Purpose | When to Use |
|---|---|---|
| memory_limiter | Protects Collector from OOMs by enforcing memory caps | Always on production Collectors |
| batch | Aggregates telemetry for efficient export | Default in production pipelines |
| resourcedetection | Auto-detect host/cloud/container metadata | Multi-cloud or mixed infra deployments |
| resource | Add/modify resource-level attributes | Standardize resource attributes |
| k8sattributes | Enrich telemetry with Kubernetes metadata | When the Collector runs in Kubernetes |
| attributes | Insert/update/delete/hash attributes | Tagging & PII sanitization |
| transform (OTTL) | Rule-based transformations using OTTL | Complex conditional transformations |
| filter | Drop noisy or irrelevant telemetry | Reduce cost and noise |
| probabilistic_sampler | Deterministic percent-based trace sampling | High-traffic sampling with repeatability |
| tail_sampling | Keep traces based on full-trace evaluation | Preserve error or slow traces |
| deltatocumulative / cumulativedelta | Convert metric temporality | Backend-specific metric expectations |
| span | Rename/standardize span names and statuses | Improve trace readability/searchability |
Recap of Popular Processors
- memory_limiter — prevents OOMs and stabilizes the Collector
- resourcedetection — auto-discovers host/cloud/container metadata
- resource — modify or add resource-level attributes
- k8sattributes — enrich telemetry with Kubernetes metadata
- attributes — insert/delete/hash attributes across signals
- transform — apply OTTL-based complex rules
- filter — drop noisy or unwanted telemetry
- probabilistic_sampler — deterministic percent-based sampling
- tail_sampling — keep critical traces by evaluating full traces
- deltatocumulative / cumulativedelta — temporality conversions for metrics
- span — rename and standardize spans for readability
- batch — group telemetry before export for efficiency


- OpenTelemetry Collector Documentation
- OTTL (OpenTelemetry Transformation Language) Reference
- Kubernetes Concepts