Opentelemetry_client.Batch
A thread-safe batch of resources to be popper when ready .
val make :
?batch:int ->
?high_watermark:int ->
?now:Mtime.t ->
?timeout:Mtime.span ->
unit ->
'a t
make ()
is a new batch
pop_if_ready ~now b
is Some xs
, where is xs
includes all the elements push
ed since the last batch, if the batch ready to be emitted.
A batch is ready to pop if it contains some elements and
batch
elements have been pushed, ortimeout
was provided, and more than a timeout
span has passed since the last pop was ready, orforce
d,