Skip to main content
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.
BatchSpanProcessorSimpleSpanProcessor
Best ForProduction & staging environmentsLocal debugging, demos, CI tests
Export BehaviorExports spans asynchronously in batchesExports each span immediately (sync)
Impact on LatencyLow latency – work done off the request pathHigher latency – export blocks the request
ThroughputHigh throughput, optimized for volumeLow throughput, can bottleneck under load
Resource UsageUses memory for queue & background threadMinimal memory overhead
Reliability on ExitRequires force_flush() / shutdown() to avoid span lossSpans exported immediately, low chance of loss
Visibility SpeedSlight delay (buffering) before spans visibleImmediate – spans appear as soon as they end
Failure SurfacingExport failures logged in backgroundFailures raised inline (easy to notice)
Tuning OptionsHighly configurable (batch size, delay, timeouts)Minimal configuration
To learn more about how to configure: OTEL Guide to batch processing.