Imandrakit_log.Trace_async
module Trace = Trace_core
type Trace.extension_event +=
| Ev_link_span of Trace.explicit_span * Trace.explicit_span_ctx
Link the given span to the given context. The context isn't the parent, but the link can be used to correlate both spans.
*)| Ev_record_exn of {
sp : Trace.span;
exn : exn;
bt : Stdlib.Printexc.raw_backtrace;
error : bool;
Is this an actual internal error?
*)}
Record exception and potentially turn span to an error
*)| Ev_push_async_parent of Trace.explicit_span_ctx
Set current async span
*)| Ev_pop_async_parent of Trace.explicit_span_ctx
Remove current async span
*)val link_spans : Trace.explicit_span -> src:Trace.explicit_span_ctx -> unit
Link the given span to the given context
val k_span_ctx : Trace.explicit_span_ctx Hmap.key
Current parent scope for async spans
val add_exn_to_span :
is_error:bool ->
Trace.span ->
exn ->
Stdlib.Printexc.raw_backtrace ->
unit
Record exception in the span
val push_async_parent : Trace.explicit_span_ctx -> unit
val pop_async_parent : Trace.explicit_span_ctx -> unit
val with_async_parent : Trace.explicit_span_ctx -> (unit -> 'a) -> 'a
val with_span :
?level:Trace.Level.t ->
?parent:Trace.explicit_span_ctx ->
?data:(unit -> (string * Trace.user_data) list) ->
?__FUNCTION__:string ->
__FILE__:string ->
__LINE__:int ->
string ->
((Trace.explicit_span * Trace.explicit_span_ctx) -> 'a) ->
'a
Wrap f()
in a async span.
val enrich_span_service : ?version:string -> Trace.explicit_span -> unit
val enrich_span_deployment :
?id:string ->
?name:string ->
deployment:string ->
Trace.explicit_span ->
unit
val add_auto_enrich_span : (Trace.explicit_span -> unit) -> unit
Add a hook that will be called on every explicit span