Skip to content

feat: batched span exports#320

Merged
skylarmb merged 10 commits into
federated-sdk-release-candidatefrom
feature/hhai-4150
Mar 17, 2026
Merged

feat: batched span exports#320
skylarmb merged 10 commits into
federated-sdk-release-candidatefrom
feature/hhai-4150

Conversation

@skylarmb
Copy link
Copy Markdown
Contributor

@skylarmb skylarmb commented Mar 16, 2026

When disable_batch=False (the 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 blocking network latency overhead per span.

disable_batch=True preserves the previous synchronous behavior for Lambda/serverless environments.

@skylarmb skylarmb requested a review from a team March 16, 2026 22:04
@skylarmb skylarmb changed the title Feature/hhai 4150 feat: batched span exports Mar 16, 2026
@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented Mar 16, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 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
@skylarmb skylarmb force-pushed the feature/hhai-4150 branch from f3d8f3e to de93dd1 Compare March 16, 2026 22:05
@github-actions
Copy link
Copy Markdown
Contributor

📚 Documentation preview built — Download artifact

Review instructions & validation status

How to Review

  1. Download the artifact from the link above
  2. Extract the files
  3. Open index.html in your browser

Validation Status

  • API validation: ✅ Passed
  • Build process: ✅ Successful
  • Import tests: ✅ All imports working

@skylarmb skylarmb force-pushed the feature/hhai-4150 branch from 1a9c9df to 14b1b8f Compare March 16, 2026 22:13
@github-actions
Copy link
Copy Markdown
Contributor

📚 Documentation preview built — Download artifact

Review instructions & validation status

How to Review

  1. Download the artifact from the link above
  2. Extract the files
  3. Open index.html in your browser

Validation Status

  • API validation: ✅ Passed
  • Build process: ✅ Successful
  • Import tests: ✅ All imports working

@github-actions
Copy link
Copy Markdown
Contributor

📚 Documentation preview built — Download artifact

Review instructions & validation status

How to Review

  1. Download the artifact from the link above
  2. Extract the files
  3. Open index.html in your browser

Validation Status

  • API validation: ✅ Passed
  • Build process: ✅ Successful
  • Import tests: ✅ All imports working

- 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
@github-actions
Copy link
Copy Markdown
Contributor

📚 Documentation preview built — Download artifact

Review instructions & validation status

How to Review

  1. Download the artifact from the link above
  2. Extract the files
  3. Open index.html in your browser

Validation Status

  • API validation: ✅ Passed
  • Build process: ✅ Successful
  • Import tests: ✅ All imports working

@github-actions
Copy link
Copy Markdown
Contributor

📚 Documentation preview built — Download artifact

Review instructions & validation status

How to Review

  1. Download the artifact from the link above
  2. Extract the files
  3. Open index.html in your browser

Validation Status

  • API validation: ✅ Passed
  • Build process: ✅ Successful
  • Import tests: ✅ All imports working

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
@github-actions
Copy link
Copy Markdown
Contributor

📚 Documentation preview built — Download artifact

Review instructions & validation status

How to Review

  1. Download the artifact from the link above
  2. Extract the files
  3. Open index.html in your browser

Validation Status

  • API validation: ✅ Passed
  • Build process: ✅ Successful
  • Import tests: ✅ All imports working

Comment thread src/honeyhive/tracer/processing/span_processor.py
Comment thread src/honeyhive/tracer/processing/span_processor.py Outdated
Comment thread src/honeyhive/tracer/processing/span_processor.py
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
@github-actions
Copy link
Copy Markdown
Contributor

📚 Documentation preview built — Download artifact

Review instructions & validation status

How to Review

  1. Download the artifact from the link above
  2. Extract the files
  3. Open index.html in your browser

Validation Status

  • API validation: ✅ Passed
  • Build process: ✅ Successful
  • Import tests: ✅ All imports working

@skylarmb skylarmb merged commit b50cdc3 into federated-sdk-release-candidate Mar 17, 2026
17 checks passed
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.

2 participants