opentelemetry-go
opentelemetry-go copied to clipboard
Investigate restructuring the BatchSpanProcessor queue and batching algorithm
As a result of our queueing strategy with the enque being asynchronous from the processing of the batch it is possible for spans to be dropped instead of flushed when a user calls for this flush or shutdown.
Alternatives should be discussed here.
Originally posted by @MrAlias in https://github.com/open-telemetry/opentelemetry-go/pull/1166#discussion_r487329301
I experimented with a batcher that uses a channel to manage state a while back here. If this looks like a promising route I can put a bit more time to double check that it works 100%, and add more comments to aid in getting this ready for a PR.
I experimented with a batcher that uses a channel to manage state a while back here. If this looks like a promising route I can put a bit more time to double check that it works 100%, and add more comments to aid in getting this ready for a PR.
Sounds good to me :+1:.
Related issues:
- https://github.com/open-telemetry/opentelemetry-go/pull/4353#discussion_r1272180864
- https://github.com/open-telemetry/opentelemetry-go/pull/4353#discussion_r1272220665
Side note: The processing logic may be implemented similarly to PeriodicReader.