ocaml-opentelemetry/src/client/sync/bounded_queue_sync.mli
Simon Cruanes 5f3b162290 bounded queue: provide a per-item measure function for better errors/metrics
we can now know how big the batches we drop are
2026-04-10 15:09:59 -04:00

12 lines
500 B
OCaml

(** Bounded queue based on simple synchronization primitives.
This is not the fastest queue but it should be versatile. *)
val create :
?measure:('a -> int) -> high_watermark:int -> unit -> 'a Bounded_queue.t
(** [create ~high_watermark ()] creates a new bounded queue based on
{!Sync_queue}.
@param measure
maps each item to its signal count (e.g. number of spans in a batch). Used
to report accurate signal counts when items are dropped. Default:
[fun _ -> 1]. *)