ShowMerit

Batch Processor Deprecated? Size sending_queue in Items Before an Outage

The OpenTelemetry Collector's batch processor is deprecated. On EKS with a 30 s outage, exporter batching with sending_queue sized in items delivered all 3,008 spans in both runs; with the default queue it filled and the app sent 1,712 and 1,840.

Rechecked 1 Dec 2026: works with splunk-otel-collector chart 0.163.1 and 0.165.0 (on a GitHub runner)

Abhimanyu BajajPublished 25 Nov 20266 min readTested in eu-central-1Lab codeLab evidence

Run this yourself

On your AWS account

The full lab with your own AWS account and Splunk token. Follow the steps in this article, then run its clean up step so nothing keeps running.

git clone https://github.com/Abhimanyu9988/showmerit.git
cd showmerit/labs/batch-processor-deprecated-size-sending-queue-in-items

The OpenTelemetry Collector's batch processor is being retired, and batching moves into the exporter. I tested the move with my backend switched off for 30 seconds. With the exporter's queue sized in spans (sizer: items, queue_size: 100000), every one of my app's 3,008 spans got through in both runs, and the queue never passed 2,072 spans of its 100,000.

That setting is the part to add when you migrate. With the queue left at its default, the same outage went differently: the queue filled, and my app sent fewer spans.

Bar chart: spans the app sent in 50 s with a 30 s outage. Batch processor: 3,008 in both runs, queue peak 172 and 162 of 1,000 requests. One-line migration with the default queue: 1,712 and 1,840, queue at 1,000 of 1,000. Migration with the queue sized in spans: 3,008 in both runs, queue peak 1,960 and 2,072 of 100,000

What I tested, in plain words

My app sends its traces to a gateway Collector, a small service that forwards them to Splunk Observability Cloud. A span is one timed step of work in a trace. My test app sent about 60 spans a second, one span per request, like many small apps talking to one gateway.

When the backend goes away, the Collector parks what it can't send in a waiting line, the sending queue. By default it holds 1,000 requests.

The OpenTelemetry blog gives the migration as one line: drop the batch processor and turn on batching in the exporter. It also warns that the same queue size can then hold much less data. I ran three configs, two runs each:

Why 1,000 wasn't enough, and how to size it

The arithmetic is short. About 60 single-span requests a second for a 30-second outage is about 1,800 requests, and the default queue holds 1,000. With the batch processor in front, the same spans arrived as a few bigger requests, and the queue peaked at 172.

Sized in spans, the queue peaked at 1,960 and 2,072. That's close to 60 spans a second times the 30-second outage (1,800), plus what was still waiting to go out. So a starting point is: your spans a second at the gateway, times your longest outage in seconds, with room on top. 100,000 left plenty here.

What I took away

The migration is easy, and the exporter is where batching lives from now on. Change the queue in the same commit: count it in spans and size it for your longest outage.

The numbers

50 s of load, the backend off from 10 s to 40 s. "App sent" is my test app's own count; the rest are the gateway Collector's own metrics.

Run App sent Accepted Refused Failed to queue Sent on Queue peak
batch-1 3,008 3,008 0 0 3,008 172 / 1,000 requests
batch-2 3,008 3,008 0 0 3,008 162 / 1,000 requests
migrated-1 1,712 1,712 4 4 1,712 1,000 / 1,000 requests
migrated-2 1,840 1,840 3 3 1,840 1,000 / 1,000 requests
sized-1 3,008 3,008 0 0 3,008 1,960 / 100,000 spans
sized-2 3,008 3,008 0 0 3,008 2,072 / 100,000 spans

Before the outage, the gateway took in 60.0 to 60.6 spans a second in every run. From the 2-second reads of its queue, the queue was back to its normal level 8 to 10 seconds after the backend returned, in every run.

From Splunk APM, as a second source: the span count for the app moved with the gateway's count and was exactly half of it in every run. It was 1,504 for all four batch and sized runs (against 3,008), 856 for migrated-1 (against 1,712) and 920 for migrated-2 (against 1,840). Each trace from my test app has two spans, a client span and a server span, so counting one span per trace is the likely reason for the half. The lab didn't check that. The program the lab read for each run's window (with a fallback to histogram('spans', ...).count().publish() when it reads 0, which it didn't here):

data('spans.count', filter=filter('sf_environment', '<lab name>') and filter('sf_service', 'checkout-load'), rollup='delta').sum().publish()

Try it yourself

The lab runs on Amazon EKS with two t3.large nodes, the Splunk OTel Collector Helm chart 0.163.1 as the agent, and the upstream Collector (contrib 0.165.0) as the gateway. A second small Collector, the relay, sits between the gateway and the agent. Scaling it to 0 is the outage. The load is telemetrygen v0.165.0.

The batch processor config (before):

processors:
  batch: {}
exporters:
  otlphttp:
    endpoint: http://relay:4318
    retry_on_failure:
      max_interval: 5s

The one-line migration:

exporters:
  otlphttp:
    endpoint: http://relay:4318
    retry_on_failure:
      max_interval: 5s
    sending_queue:
      batch:
        enabled: true

The fix, the queue sized in spans:

exporters:
  otlphttp:
    endpoint: http://relay:4318
    retry_on_failure:
      max_interval: 5s
    sending_queue:
      sizer: items
      queue_size: 100000
      batch:
        enabled: true

The load, about 60 spans a second as single-span requests:

telemetrygen traces --otlp-http --otlp-endpoint=gateway.demo.svc.cluster.local:4318 --otlp-insecure \
  --batch=false --workers=4 --rate=15 --duration=50s --service=checkout-load --allow-export-failures

Things to plan for:

Every script and the raw output of every run are in the lab folder.

Every file in this lab

Everything above runs from these files. Open any of them to copy it, or clone the repo as shown:

Sources

Disclosure: I work at Splunk, part of Cisco. This is my personal blog; the post isn't sponsored or reviewed by my employer.


I built this in a disposable AWS lab. The lab code and raw output are in the repo. Drafted with AI assistance and reviewed by me.

Read next

OpenTelemetry code owner for two Collector components. Writes hands-on AWS container guides, each tested in a lab. See the proof