Batch vs Simple Span Processor

A span processor is a component in the OpenTelemetry SDK tracing pipeline that intercepts spans when they start and end, and controls when and how they are exported.

There are two options when it comes to choosing which span processor to use:

  • A Simple Span Processor: exports each span immediately when it ends (good for debugging/development but higher overhead)

  • A Batch Span Processor: buffers spans and sends them in batches (better for production/performance)

Choosing the right processor is important because your LLM/agent workflows can generate large volumes of spans: using batch processing helps keep tracing efficient and avoids impacting your application’s performance.

BatchSpanProcessor
SimpleSpanProcessor

Best For

Production & staging environments

Local debugging, demos, CI tests

Export Behavior

Exports spans asynchronously in batches

Exports each span immediately (sync)

Impact on Latency

Low latency – work done off the request path

Higher latency – export blocks the request

Throughput

High throughput, optimized for volume

Low throughput, can bottleneck under load

Resource Usage

Uses memory for queue & background thread

Minimal memory overhead

Reliability on Exit

Requires force_flush() / shutdown() to avoid span loss

Spans exported immediately, low chance of loss

Visibility Speed

Slight delay (buffering) before spans visible

Immediate – spans appear as soon as they end

Failure Surfacing

Export failures logged in background

Failures raised inline (easy to notice)

Tuning Options

Highly configurable (batch size, delay, timeouts)

Minimal configuration

To learn more about how to configure: OTEL Guide to batch processing.

Last updated

Was this helpful?