opentelemetry-go icon indicating copy to clipboard operation
opentelemetry-go copied to clipboard

Investigate restructuring the BatchSpanProcessor queue and batching algorithm

Open MrAlias opened this issue 5 years ago • 3 comments

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

MrAlias avatar Sep 15 '20 14:09 MrAlias

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.

MadVikingGod avatar Nov 19 '21 15:11 MadVikingGod

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:.

MrAlias avatar Nov 19 '21 16:11 MrAlias

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.

pellared avatar Jul 24 '23 15:07 pellared