feat: batched span exports#320
Merged
Merged
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
When disable_batch=False (default), spans are now queued and exported asynchronously in a background thread via OTel's BatchSpanProcessor, rather than being exported synchronously inline on each span.end(). This eliminates ~100-1200ms of blocking latency per span. disable_batch=True preserves the previous synchronous behavior for Lambda/serverless environments. ✨ Created with Claude Code
✨ Created with Claude Code
This reverts commit d531154.
✨ Created with Claude Code
f3d8f3e to
de93dd1
Compare
Contributor
|
📚 Documentation preview built — Download artifact Review instructions & validation statusHow to Review
Validation Status
|
✨ Created with Claude Code
1a9c9df to
14b1b8f
Compare
Contributor
|
📚 Documentation preview built — Download artifact Review instructions & validation statusHow to Review
Validation Status
|
Contributor
|
📚 Documentation preview built — Download artifact Review instructions & validation statusHow to Review
Validation Status
|
- MockHoneyHiveTracer.config now supports .get() and has disable_batch - Edge case test reads disable_batch from config, not tracer instance - Span filter tests use disable_batch=True to test direct export path ✨ Created with Claude Code
Contributor
|
📚 Documentation preview built — Download artifact Review instructions & validation statusHow to Review
Validation Status
|
… into feature/hhai-4150
Contributor
|
📚 Documentation preview built — Download artifact Review instructions & validation statusHow to Review
Validation Status
|
Tests were asserting direct exporter.export() calls, but the default disable_batch=False now delegates to BatchSpanProcessor. Fixed by: - Adding disable_batch=True for tests verifying synchronous export path - Mocking _batch_processor in batched mode test to assert on_end delegation - Configuring mock config.get() to return proper bool values instead of Mock ✨ Created with Claude Code
Contributor
|
📚 Documentation preview built — Download artifact Review instructions & validation statusHow to Review
Validation Status
|
skylarmb
commented
Mar 16, 2026
SidPrak7
requested changes
Mar 17, 2026
Remove custom DEFAULT_MAX_QUEUE_SIZE, DEFAULT_SCHEDULE_DELAY_MILLIS, DEFAULT_MAX_EXPORT_BATCH_SIZE, DEFAULT_EXPORT_TIMEOUT_MILLIS and the corresponding constructor params. BatchSpanProcessor now uses OTel's well-tested defaults (queue=2048, delay=5000ms, batch=512, timeout=30s). ✨ Created with Claude Code
Contributor
|
📚 Documentation preview built — Download artifact Review instructions & validation statusHow to Review
Validation Status
|
SidPrak7
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
disable_batch=False(the default), spans are now queued and exported asynchronously in a background thread via OTel'sBatchSpanProcessor, rather than being exported synchronously inline on eachspan.end(). This eliminates blocking network latency overhead per span.disable_batch=Truepreserves the previous synchronous behavior for Lambda/serverless environments.