Imandrakit_log.Trace_async
module Trace = Trace_core
val equal_span_kind : span_kind -> span_kind -> Ppx_deriving_runtime.bool
val span_kind_to_twine_ref :
(Imandrakit_twine.Encode.t ->
span_kind ->
Imandrakit_twine.Encode.immediate)
ref
val span_kind_of_twine_ref :
(Imandrakit_twine.Decode.t -> int -> span_kind) ref
val span_kind_to_twine :
Imandrakit_twine.Encode.t ->
span_kind ->
Imandrakit_twine.Encode.immediate
val span_kind_of_twine : Imandrakit_twine.Decode.t -> int -> span_kind
val pp_span_kind :
Ppx_deriving_runtime.Format.formatter ->
span_kind ->
Ppx_deriving_runtime.unit
val show_span_kind : span_kind -> Ppx_deriving_runtime.string
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
*)| Ev_set_span_kind of Trace.span * span_kind
val link_spans : Trace.explicit_span -> src:Trace.explicit_span_ctx -> unit
Link the given span to the given context
val set_span_kind : Trace.span -> span_kind -> unit
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