Describe the Problem
In auto_instrument, Traceloop.init is called with a hardcoded value of disable_batch=True. This causes SimpleSpanProcessor to always be used instead of BatchSpanProcessor, which makes span processing and exporting essentially sequential and is not recommended as a default choice.
I used auto_instrument to instrument my agent, writing to SAP's Cloud Logging Service and then hit the agent with around 9 concurrent requests (not very much). Then I manually patched auto_instrument to use disable_batch=False and re-ran the same workload and the agent's response time went from about 40s per request (with disable_batch=True) to about 5s per request (with disable_batch=False).
Therefore, I strongly believe that disable_batch should be set to False as a default or at least be user-configurable because sequential exporting has way too much overhead for a simple use case.
Propose a Solution
Provide a user-configurable way (e.g. env var or parameter to auto_instrument) to allow non-sequential span exporting.
I also propose setting the default value to disable_batch=False instead of disable_batch=True.
Describe Alternatives
No response
Affected Development Phase
Release
Impact
Impaired
Timeline
Code freeze in 1 week
Describe the Problem
In
auto_instrument,Traceloop.initis called with a hardcoded value ofdisable_batch=True. This causesSimpleSpanProcessorto always be used instead ofBatchSpanProcessor, which makes span processing and exporting essentially sequential and is not recommended as a default choice.I used
auto_instrumentto instrument my agent, writing to SAP's Cloud Logging Service and then hit the agent with around 9 concurrent requests (not very much). Then I manually patchedauto_instrumentto usedisable_batch=Falseand re-ran the same workload and the agent's response time went from about 40s per request (withdisable_batch=True) to about 5s per request (withdisable_batch=False).Therefore, I strongly believe that
disable_batchshould be set toFalseas a default or at least be user-configurable because sequential exporting has way too much overhead for a simple use case.Propose a Solution
Provide a user-configurable way (e.g. env var or parameter to
auto_instrument) to allow non-sequential span exporting.I also propose setting the default value to
disable_batch=Falseinstead ofdisable_batch=True.Describe Alternatives
No response
Affected Development Phase
Release
Impact
Impaired
Timeline
Code freeze in 1 week