package opentelemetry
Module Opentelemetry_client.BatchSource
A thread-safe batch of resources to be popper when ready .
Source
val make :
?batch:int ->
?high_watermark:int ->
?now:Mtime.t ->
?timeout:Mtime.span ->
unit ->
'a tmake () is a new batch
pop_if_ready ~now b is Some xs, where is xs includes all the elements pushed since the last batch, if the batch ready to be emitted.
A batch is ready to pop if it contains some elements and
- batching is disabled, and any elements have been batched, or batching was enabled and at least
batchelements have been pushed, or - a
timeoutwas provided, and more than atimeoutspan has passed since the last pop was ready, or - the pop is
forced,