package trace

  1. Overview
  2. Docs

Module Subscriber.CallbacksSource

Type of the state passed to every callback.

Sourceval on_init : st -> time_ns:int64 -> unit

Called when the subscriber is initialized in a collector

Sourceval on_shutdown : st -> time_ns:int64 -> unit

Called when the collector is shutdown

Sourceval on_name_thread : st -> time_ns:int64 -> tid:int -> name:string -> unit

Current thread is being named

Sourceval on_name_process : st -> time_ns:int64 -> tid:int -> name:string -> unit

Current process is being named

Sourceval on_enter_span : st -> __FUNCTION__:string option -> __FILE__:string -> __LINE__:int -> time_ns:int64 -> tid:int -> data:(string * Trace_subscriber__.Types.user_data) list -> name:string -> Trace_core.span -> unit

Enter a regular (sync) span

Sourceval on_exit_span : st -> time_ns:int64 -> tid:int -> Trace_core.span -> unit

Exit a span. This and on_enter_span must follow strict stack discipline

Sourceval on_add_data : st -> data:(string * Trace_subscriber__.Types.user_data) list -> Trace_core.span -> unit

Add data to a regular span (which must be active)

Sourceval on_message : st -> time_ns:int64 -> tid:int -> span:Trace_core.span option -> data:(string * Trace_subscriber__.Types.user_data) list -> string -> unit

Emit a log message

Sourceval on_counter : st -> time_ns:int64 -> tid:int -> data:(string * Trace_subscriber__.Types.user_data) list -> name:string -> float -> unit

Emit the current value of a counter

Sourceval on_enter_manual_span : st -> __FUNCTION__:string option -> __FILE__:string -> __LINE__:int -> time_ns:int64 -> tid:int -> parent:Trace_core.span option -> data:(string * Trace_subscriber__.Types.user_data) list -> name:string -> flavor:Trace_subscriber__.Types.flavor option -> trace_id:Trace_core.trace_id -> Trace_core.span -> unit

Enter a manual (possibly async) span

Sourceval on_exit_manual_span : st -> time_ns:int64 -> tid:int -> name:string -> data:(string * Trace_subscriber__.Types.user_data) list -> flavor:Trace_subscriber__.Types.flavor option -> trace_id:Trace_core.trace_id -> Trace_core.span -> unit

Exit a manual span

Sourceval on_extension_event : st -> time_ns:int64 -> tid:int -> Trace_core.extension_event -> unit

Extension event

  • since 0.8
OCaml

Innovation. Community. Security.