Module Imandrakit_log.Trace_async

module Trace = Trace_core
module Log : Logger.LOG
type span_id = int64
type trace_id = string
val dummy_span : int64
val dummy_trace_id : trace_id
type explicit_span = {
  1. span : span_id;
    (*

    Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.

    *)
  2. trace_id : trace_id;
    (*

    The trace this belongs to

    *)
  3. mutable meta : unit;
    (*

    Metadata for this span (and its context). This can be used by collectors to carry collector-specific information from the beginning of the span, to the end of the span.

    *)
}
val k_span_ctx : Trace.span Hmap.key

Current parent scope for async spans

val with_span : ?level:Trace.Level.t -> ?parent:Trace.span -> ?data:(unit -> (string * Trace.user_data) list) -> ?__FUNCTION__:string -> __FILE__:string -> __LINE__:int -> string -> (Trace.span -> 'a) -> 'a

Wrap f() in a async span.

val with_fresh_trace : level:Trace.Level.t -> ?data:(unit -> (string * Trace.user_data) list) -> ?__FUNCTION__:string -> __FILE__:string -> __LINE__:int -> string -> (Trace.span -> 'a) -> 'a
val add_data_to_span : Trace.span -> (string * Trace.user_data) list -> unit
val enrich_span_service : ?version:string -> Trace.span -> unit
val enrich_span_deployment : ?id:string -> ?name:string -> deployment:string -> Trace.span -> unit
val add_auto_enrich_span : (Trace.span -> unit) -> unit

Add a hook that will be called on every explicit span