Skip to main content
Processors are the central transformation and enrichment layer in the OpenTelemetry Collector pipeline. Sitting between receivers and exporters, processors can:
  • 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.
This guide explains common processors, when to use them, and provides example configurations you can adapt for production.
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:
Recommended: enable on production Collectors to avoid the Linux OOM killer terminating the process under memory pressure.

Batch

Groups telemetry into larger batches before exporting to reduce network calls and improve compression. Example:
Recommended: use batching in production pipelines for better throughput and backend efficiency.

Resource Detection

Automatically detects platform and environment metadata (host, cloud, container, etc.) and attaches it as resource attributes. Example:
Use this to ensure telemetry contains consistent host/container/cloud metadata across environments.

Resource Processor

Modifies or adds resource-level attributes that apply consistently across all signals. Example:
Common uses: label environments, copy attributes into standardized keys, or remove unwanted resource attributes.

Kubernetes Attributes

Enriches telemetry with Kubernetes metadata (pod, namespace, deployment, etc.). Commonly uses the pod service account for authentication. Example:
Use when running the Collector in Kubernetes to correlate telemetry with K8s resources for investigation and dashboards.

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:
This is a common processor for tagging signals and sanitizing attributes before export.

Transform (OTTL)

Applies conditional rules using the OpenTelemetry Transformation Language (OTTL) for complex, expression-based changes. Example:
Use transform for advanced renaming, conditional status updates, and dynamic attribute extraction. More: OTTL reference.

Filter

Drops telemetry that matches defined conditions to reduce noise and backend costs. Example:
Typical use cases: drop health-check spans, verbose debug logs, or low-severity log records.

Probabilistic Sampler

Samples a fixed percentage of traces using a deterministic hash of the trace ID. Good for predictable, repeatable sampling. Example:
Use in high-traffic systems where consistent downsampling of traces is required.

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:
Best for retaining error traces and high-latency traces that are important to debugging.

Delta ↔ Cumulative Conversions

Some backends expect cumulative counters, others expect delta metrics. Use temporality conversion processors to adapt metric streams. Delta → Cumulative:
Cumulative → Delta (selective):
These processors maintain state for metric points, compute differences or accumulate as needed, and clear state when streams go stale.

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):
Use this to standardize span names for searchability and to mark spans as errors when HTTP codes indicate failure.

Processor Order Best Practices

Processor ordering impacts correctness, data quality, and Collector stability. A typical ordering pattern:
  1. memory_limiter — protect the Collector
  2. attributes / transform — normalize and enrich data
  3. resourcedetection / k8sattributes — add infrastructure metadata
  4. 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.
Example pipeline demonstrating recommended ordering:
The image illustrates the OpenTelemetry Processor Pipeline, highlighting the sequence of Memory Limiter, Attributes, Resource, and Batch stages, with notes on the importance of order for preventing crashes and optimizing data processing.

Quick Reference Table

ProcessorPurposeWhen to Use
memory_limiterProtects Collector from OOMs by enforcing memory capsAlways on production Collectors
batchAggregates telemetry for efficient exportDefault in production pipelines
resourcedetectionAuto-detect host/cloud/container metadataMulti-cloud or mixed infra deployments
resourceAdd/modify resource-level attributesStandardize resource attributes
k8sattributesEnrich telemetry with Kubernetes metadataWhen the Collector runs in Kubernetes
attributesInsert/update/delete/hash attributesTagging & PII sanitization
transform (OTTL)Rule-based transformations using OTTLComplex conditional transformations
filterDrop noisy or irrelevant telemetryReduce cost and noise
probabilistic_samplerDeterministic percent-based trace samplingHigh-traffic sampling with repeatability
tail_samplingKeep traces based on full-trace evaluationPreserve error or slow traces
deltatocumulative / cumulativedeltaConvert metric temporalityBackend-specific metric expectations
spanRename/standardize span names and statusesImprove trace readability/searchability

  • 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
The image lists popular processor types with descriptions, including Memory Limiter, Resource Detection, Resource, K8s Attributes, Attributes, and Transform.
The image depicts a data processing flowchart with three main components: "Receivers," "Processors," and "Exporters," highlighting benefits such as enriching, filtering, optimizing, and stabilizing data services.
Processors are optional from a configuration perspective but essential in practice: they make telemetry actionable, cost-effective, and stable. Choose the right processors and arrange them intentionally so your backend receives clean, complete, and useful telemetry. References and further reading: This is the end of the article on processors.

Watch Video