Merged
Conversation
ArthurTonial
approved these changes
Apr 9, 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.

Description
This PR changes the default to disable_batch=False (async BatchSpanProcessor) and exposes the parameter so users can override it when needed.
auto_instrument was hardcoding disable_batch=True, forcing SimpleSpanProcessor which exports spans synchronously on the request thread. With concurrent workloads, the network round-trip to the OTEL collector adds up directly on the hot path. A user reported response times dropping from ~40s to ~5s under 9 concurrent requests after patching this locally.
Related Issue
Closes #40
Type of Change
How to Test
Checklist
Breaking Changes
None. The new default (disable_batch=False) is a behavior improvement. Users who relied on the previous synchronous behavior can restore it with auto_instrument(disable_batch=True).
Additional Notes
Trade-offs of BatchSpanProcessor (the new default):
For these cases, disable_batch=True remains available and is documented in the user guide.