Module Trace_subscriber.Span_tbl

A table that can be used to remember information about spans.

This is convenient when we want to rememner information from a span begin, when dealing with the corresponding span end.

NOTE: this is thread safe when threads are enabled.

type 'v t
val create : unit -> 'v t
val add : 'v t -> Trace_core.span -> 'v -> unit
val find_exn : 'v t -> Trace_core.span -> 'v
  • raises Not_found

    if information isn't found

val remove : _ t -> Trace_core.span -> unit

Remove the span if present

val to_list : 'v t -> (Trace_core.span * 'v) list