open-telemetry / open-telemetry/opentelemetry-java

Unbounded batching span processor

Open
#7,099 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
Java
Stars
2.5k
Forks
1k
Avg merge
3d 17h
Merged PRs (30d)
58

Description

Is your feature request related to a problem? Please describe.
The default span processor which is a batch span processor, and the default maximum queue size which is 2048, are very susceptible to span loss for a system under any non-trivial load.

Describe the solution you'd like
It should be possible, with the java opentelemetry SDK, to configure a span processor which is batching but has an unbounded queue size, to ensure no span loss under arbitrary load, at the cost of unbounded memory usage.

Describe alternatives you've considered
With the current jctools-based implementation, one can configure otel.bsp.max.queue.size to a very large value, at most 1073741824. This probably achieves the same in practice, but is a workaround.

Additional context

I'm unsure whether adding the possibility of making the queue unbounded contradicts the specification at https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#batching-processor

If so, perhaps a new batching processor type can be introduced, UnboundedBatchingSpanProcessor.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Java SDK's default batch span processor behavior and the linked OpenTelemetry batching-processor specification. Compare the current jctools-based queue and otel.bsp.max.queue.size limit with the requested unbounded option. Done means resolving whether the specification permits this and defining an appropriate processor or configuration path without span loss under arbitrary load.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.