Skip to content

[chore] Add sharded batcher wrapper for unpartitioned batching - #15460

Open
iblancasa wants to merge 10 commits into
open-telemetry:mainfrom
iblancasa:12473
Open

[chore] Add sharded batcher wrapper for unpartitioned batching#15460
iblancasa wants to merge 10 commits into
open-telemetry:mainfrom
iblancasa:12473

Conversation

@iblancasa

@iblancasa iblancasa commented Jun 17, 2026

Copy link
Copy Markdown
Member

Description

Adds an internal shardedBatcher wrapper for the unpartitioned exporterhelper batch path. It keeps behavior unchanged by constructing the wrapper with exactly one shard. The shard itself is the existing partitionBatcher, so current batching semantics for min_size, flush_timeout, shutdown draining, and request completion remain delegated to the existing implementation.

This is a first step to allow unpartitioned batching to use multiple independent batch streams (follow up PR).

Link to tracking issue

Updates #12473

Testing

  • Local manual testing
  • make test in exporterhelper

Authorship

  • I, a human, wrote this pull request description myself.

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa iblancasa changed the title Add sharded batcher wrapper for unpartitioned batching [chore] Add sharded batcher wrapper for unpartitioned batching Jun 17, 2026
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.05%. Comparing base (9ee240d) to head (7911c3f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15460   +/-   ##
=======================================
  Coverage   91.04%   91.05%           
=======================================
  Files         728      729    +1     
  Lines       48467    48488   +21     
=======================================
+ Hits        44129    44150   +21     
  Misses       3011     3011           
  Partials     1327     1327           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@iblancasa
iblancasa marked this pull request as ready for review June 17, 2026 12:14
@iblancasa
iblancasa requested a review from a team as a code owner June 17, 2026 12:14
@iblancasa
iblancasa requested a review from songy23 June 17, 2026 12:14

@mwear mwear left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM. I understand that the goal is to keep behavior unchanged by routing through a single shard. But the round-robin multi-shard routing is already implemented and reachable, and every test uses one shard, so that distribution path never actually runs. What do you think about a shardCount > 1 test that checks requests get spread across shards and that all shards flush and drain correctly?

@iblancasa

Copy link
Copy Markdown
Member Author

@mwear I was planning to add this in follow up PRs but, at the same time, understand that it can be interesting to see this now. Added.

@mwear mwear left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @iblancasa.

@dmitryax

Copy link
Copy Markdown
Member

@iblancasa can you please submit a follow-up PR on top of this in draft state? I'd like to see how you plan this to be implemented before merging this.

@iblancasa

Copy link
Copy Markdown
Member Author

@iblancasa can you please submit a follow-up PR on top of this in draft state? I'd like to see how you plan this to be implemented before merging this.

Done #15534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants