Use it to enrich, filter or reduce telemetry centrally.
Collector Processors
OpenTelemetry Collector processors transform data in pipelines: memory_limiter, batch, attributes/resource, filter, transform (OTTL), k8sattributes, tail_sampling.
1. Validate: otelcol validate --config config.yaml.
2. Pipeline order in service.pipelines.
3. Debug exporter to inspect output.
4. Processor metrics for dropped items.
5. Resource attributes as expected.
receiver → memory_limiter → enrich/filter/transform → batch → exporter
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 How to verify Verify boundary
Compare data in the backend before and after a processor change. Validate the configuration with the collector's validate command.
Step 2 Common failures Narrow the fault
Batch before memory_limiter weakens protection. Overly broad filters drop data you need. Enrichment that calls the Kubernetes API needs RBAC.
Order matters: memory_limiter first, batch near the end. Test transforms on sample data. Filtering early saves cost.
otelcol validate --config config.yaml— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
ReferenceWhat it is1 section · depth on demand
How it works
Each pipeline lists processors that run in order for every batch of data. Filters drop unwanted spans, metrics or logs; transforms rewrite attributes with OTTL statements.
ReferenceImportant terms & boundaries3 sections · depth on demand
Typical processor order (OpenTelemetry Collector)
processors:
memory_limiter: { check_interval: 1s, limit_percentage: 80, spike_limit_percentage: 20 }
k8sattributes: {}
resourcedetection: { detectors: [env, system] }
attributes/redact: { actions: [{ key: http.request.header.authorization, action: delete }] }
filter/health: { traces: { span: ['attributes["http.route"] == "/healthz"'] } }
batch: {}
service:
pipelines:
traces: { receivers: [otlp], processors: [memory_limiter, k8sattributes, attributes/redact, filter/health, batch], exporters: [otlp] }
Documented example, not captured output. memory_limiter first, batch last.
In depth
Pipelines are wired in service
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, k8sattributes, resource, filter/noise, batch]
exporters: [otlp/backend]
logs:
receivers: [otlp, filelog]
processors: [memory_limiter, k8sattributes, transform/redact, batch]
exporters: [otlphttp/logs]
A component defined at the top level but not listed in a pipeline does nothing.
Order and purpose
| Position | Processor | Why there |
|---|---|---|
| First | memory_limiter | Refuse data before spending memory on it |
| Early | k8sattributes, resourcedetection | Enrich while pod IP/connection info is available |
| Middle | resource, attributes, transform (OTTL) | Add, rename, hash or delete attributes |
| Middle | filter | Drop noise (health checks, debug logs) before paying to export it |
| Middle | tail_sampling | Needs complete traces; often in a separate tier |
| Last | batch | Group items for efficient export |
Redaction with the transform processor (OTTL)
processors:
transform/redact:
log_statements:
- context: log
statements:
- replace_pattern(body, "password=\\S+", "password=***")
- delete_key(attributes, "http.request.header.authorization")
Checking a configuration
otelcol-contrib validate --config=config.yaml
otelcol-contrib components # which receivers/processors/exporters this build has
Use the debug exporter (verbosity: detailed) in a test pipeline to see exactly what leaves each stage, then remove it. Distributions differ: the core build has few processors; k8sattributes, filter, transform and tail_sampling are in the contrib or vendor distributions.
Common mistakes
- Processor order dropping data before enrichment.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.