- By default, each telemetry signal (traces, metrics, logs) is forwarded to exporters immediately when received.
- High-volume telemetry can create excessive network traffic or overwhelm an exporter.
- The Collector can batch, filter, modify, or sample telemetry between receivers and exporters using processors.
Processors operate between receivers and exporters. They can modify, filter, sample, or batch telemetry before it is sent to exporters.
- Receive data from a receiver.
- Modify, enrich, filter, sample, aggregate, or batch that data.
- Forward the processed data to configured exporter(s).
| Processor | Use case | Example / notes |
|---|---|---|
attributes | Enrich, remove, or mask attributes on telemetry | See the attributes example below for insert, update, delete, hash actions. |
batch | Buffer telemetry and flush on timeout or batch size | Useful to reduce exporter load and network chatter. |
filter | Keep or drop telemetry based on expressions | Fine-grained filtering for traces, metrics, logs. |
- A timeout elapses (e.g., 15s), or
- A configured
send_batch_sizeis reached (e.g., 512 items).
timeout: 15s— flush at most every 15 seconds (since first item in the batch).send_batch_size: 512— flush sooner if the batch reaches 512 items.- The buffer flushes when either condition is met (whichever happens first).
timeout and send_batch_size to balance latency and throughput.
Batches reduce exporter load but introduce buffering delay. If you need near-real-time telemetry, set lower timeouts or avoid batching for that pipeline.
processors:, reference them in the service.pipelines section where you want them applied. Processors listed for a pipeline execute sequentially.
Example: enabling batch for traces
- When multiple processors are specified, they run in series: receiver -> processor A -> processor B -> exporter(s)
- If you generate three traces and the batch
timeoutis 15s, they will be buffered and will not reach exporters (or appear in the debug console) until:- 15 seconds have elapsed since the first item in the batch, or
- 512 items have been collected.
- Collector logs will show the receiver starting and the service becoming ready; after the timeout elapses the buffer is flushed and you’ll see debug exporter output.
- Processors let you inspect, modify, filter, sample, or batch telemetry between receivers and exporters.
- The batch processor reduces exporter load and network chatter by grouping telemetry and flushing on a timeout or size threshold.
- Add processors to specific pipelines to apply them per-signal; multiple processors run sequentially.
- Tune
timeoutandsend_batch_sizeto balance latency and throughput for your environment.
- OpenTelemetry Collector
- OTLP protocol specification
- Jaeger Tracing
- telemetrygen (generate telemetry): https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/telemetrygen