Added batching for CREATE-SPAN requests.
Batches are flushed to the streamer queue automatically every second or whenever accumulated message items reach max batch size limit (at the moment - 1000 items).
Batching works only inside the SDK, if someone tries to do the following
import opik
client = opik.Opik()
... batching will not work for that client (and all clients derived from it).
Under the hood of the SDK we instantiate Opik client like that
client = opik.Opik(_use_batching=True)
Issues
Resolves the issue when SDK sends a lot of CREATE-SPAN requests to the backend independetly, loading it and utilizing more network resources.
Backend should be less loaded,
Testing
Added unit tests. E2E tests also pass, but this PR requires extra QA.
Details
Added batching for CREATE-SPAN requests. Batches are flushed to the streamer queue automatically every second or whenever accumulated message items reach max batch size limit (at the moment - 1000 items).
Batching works only inside the SDK, if someone tries to do the following
... batching will not work for that client (and all clients derived from it).
Under the hood of the SDK we instantiate Opik client like that
Issues
Resolves the issue when SDK sends a lot of CREATE-SPAN requests to the backend independetly, loading it and utilizing more network resources. Backend should be less loaded,
Testing
Added unit tests. E2E tests also pass, but this PR requires extra QA.
Documentation
-