Pcornel
Browse topics
Options
Recent
Favorites
Observability · Technical reference

Collector Processors

Direct answer

OpenTelemetry Collector processors transform data in pipelines: memory_limiter, batch, attributes/resource, filter, transform (OTTL), k8sattributes, tail_sampling.

When to use this

Use it to enrich, filter or reduce telemetry centrally.

First 30 seconds

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.

Operational verification

receiver → memory_limiter → enrich/filter/transform → batch → exporter

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
OpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformOpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
Scope / prerequisiteUse it to enrich, filter or reduce telemetry centrally.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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.

Key points

Order matters: memory_limiter first, batch near the end. Test transforms on sample data. Filtering early saves cost.

Key checks
  • otelcol validate --config config.yaml — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool 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

PositionProcessorWhy there
Firstmemory_limiterRefuse data before spending memory on it
Earlyk8sattributes, resourcedetectionEnrich while pod IP/connection info is available
Middleresource, attributes, transform (OTTL)Add, rename, hash or delete attributes
MiddlefilterDrop noise (health checks, debug logs) before paying to export it
Middletail_samplingNeeds complete traces; often in a separate tier
LastbatchGroup 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Terminology layer

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.

Aliases that resolve here
collector processorsotel collector processorstelemetry redaction
Confirmation

Confirm action

Continue?