diff --git a/trace-fuchsia/Trace_fuchsia_write/Argument/index.html b/trace-fuchsia/Trace_fuchsia_write/Argument/index.html deleted file mode 100644 index 6bb8043..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Argument/index.html +++ /dev/null @@ -1,27 +0,0 @@ - -
Trace_fuchsia_write.Argumenttype 'a t = string * [< user_data | `Kid of int ] as 'aval check_valid_ :
- [< `Bool of bool
- | `Float of float
- | `Int of int
- | `Kid of int
- | `None
- | `String of string ]
- t ->
- unitval size_word :
- [< `Bool of bool & 'a
- | `Float of float & 'b
- | `Int of int
- | `Kid of int & 'c
- | `None
- | `String of string ]
- t ->
- intTrace_fuchsia_write.Argumentstype 'a t = 'a Argument.t listval len :
- [< `Bool of bool
- | `Float of float
- | `Int of int
- | `Kid of int
- | `None
- | `String of string ]
- t ->
- intval check_valid :
- [< `Bool of bool
- | `Float of float
- | `Int of int
- | `Kid of int
- | `None
- | `String of string ]
- t ->
- unitval size_word :
- [< `Bool of bool & 'a & 'b & 'c & 'd
- | `Float of float & 'e & 'f & 'g & 'h
- | `Int of int
- | `Kid of int & 'i & 'j & 'k & 'l
- | `None
- | `String of string ]
- t ->
- intTrace_fuchsia_write.Bufval empty : tval create : int -> tval clear : t -> unitval available : t -> intval size : t -> intval add_i64 : t -> int64 -> unitval add_string : t -> string -> unitval to_string : t -> stringBuf_pool.List_with_lenTrace_fuchsia_write.Buf_poolEvent.Async_begintype=5
val size_word :
- name:string ->
- t_ref:Thread_ref.t ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd
- | `Float of float & 'e & 'f & 'g & 'h
- | `Int of int
- | `Kid of int & 'i & 'j & 'k & 'l
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- intval encode :
- Output.t ->
- name:string ->
- t_ref:Thread_ref.t ->
- time_ns:int64 ->
- async_id:int ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd & 'e & 'f & 'g
- | `Float of float & 'h & 'i & 'j & 'k & 'l & 'm & 'n
- | `Int of int
- | `Kid of int & 'o & 'p & 'q & 'r & 's & 't & 'u
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- unitEvent.Async_endtype=7
val size_word :
- name:string ->
- t_ref:Thread_ref.t ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd
- | `Float of float & 'e & 'f & 'g & 'h
- | `Int of int
- | `Kid of int & 'i & 'j & 'k & 'l
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- intval encode :
- Output.t ->
- name:string ->
- t_ref:Thread_ref.t ->
- time_ns:int64 ->
- async_id:int ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd & 'e & 'f & 'g
- | `Float of float & 'h & 'i & 'j & 'k & 'l & 'm & 'n
- | `Int of int
- | `Kid of int & 'o & 'p & 'q & 'r & 's & 't & 'u
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- unitEvent.Countertype=1
val size_word :
- name:string ->
- t_ref:Thread_ref.t ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd
- | `Float of float & 'e & 'f & 'g & 'h
- | `Int of int
- | `Kid of int & 'i & 'j & 'k & 'l
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- intval encode :
- Output.t ->
- name:string ->
- t_ref:Thread_ref.t ->
- time_ns:int64 ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd & 'e & 'f & 'g
- | `Float of float & 'h & 'i & 'j & 'k & 'l & 'm & 'n
- | `Int of int
- | `Kid of int & 'o & 'p & 'q & 'r & 's & 't & 'u
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- unitEvent.Duration_begintype=2
val size_word :
- name:string ->
- t_ref:Thread_ref.t ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd
- | `Float of float & 'e & 'f & 'g & 'h
- | `Int of int
- | `Kid of int & 'i & 'j & 'k & 'l
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- intval encode :
- Output.t ->
- name:string ->
- t_ref:Thread_ref.t ->
- time_ns:int64 ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd & 'e & 'f & 'g
- | `Float of float & 'h & 'i & 'j & 'k & 'l & 'm & 'n
- | `Int of int
- | `Kid of int & 'o & 'p & 'q & 'r & 's & 't & 'u
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- unitEvent.Duration_completetype=4
val size_word :
- name:string ->
- t_ref:Thread_ref.t ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd
- | `Float of float & 'e & 'f & 'g & 'h
- | `Int of int
- | `Kid of int & 'i & 'j & 'k & 'l
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- intval encode :
- Output.t ->
- name:string ->
- t_ref:Thread_ref.t ->
- time_ns:int64 ->
- end_time_ns:int64 ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd & 'e & 'f & 'g
- | `Float of float & 'h & 'i & 'j & 'k & 'l & 'm & 'n
- | `Int of int
- | `Kid of int & 'o & 'p & 'q & 'r & 's & 't & 'u
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- unitEvent.Duration_endtype=3
val size_word :
- name:string ->
- t_ref:Thread_ref.t ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd
- | `Float of float & 'e & 'f & 'g & 'h
- | `Int of int
- | `Kid of int & 'i & 'j & 'k & 'l
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- intval encode :
- Output.t ->
- name:string ->
- t_ref:Thread_ref.t ->
- time_ns:int64 ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd & 'e & 'f & 'g
- | `Float of float & 'h & 'i & 'j & 'k & 'l & 'm & 'n
- | `Int of int
- | `Kid of int & 'o & 'p & 'q & 'r & 's & 't & 'u
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- unitEvent.Instanttype=0
val size_word :
- name:string ->
- t_ref:Thread_ref.t ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd
- | `Float of float & 'e & 'f & 'g & 'h
- | `Int of int
- | `Kid of int & 'i & 'j & 'k & 'l
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- intval encode :
- Output.t ->
- name:string ->
- t_ref:Thread_ref.t ->
- time_ns:int64 ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd & 'e & 'f & 'g
- | `Float of float & 'h & 'i & 'j & 'k & 'l & 'm & 'n
- | `Int of int
- | `Kid of int & 'o & 'p & 'q & 'r & 's & 't & 'u
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- unitTrace_fuchsia_write.Eventrecord type = 4
module Instant : sig ... endtype=0
module Counter : sig ... endtype=1
module Duration_begin : sig ... endtype=2
module Duration_end : sig ... endtype=3
module Duration_complete : sig ... endtype=4
module Async_begin : sig ... endtype=5
module Async_end : sig ... endtype=7
Trace_fuchsia_write.I64include module type of struct include Stdlib.Int64 endTrace_fuchsia_write.Kernel_objectrecord type = 7
val size_word :
- name:string ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd
- | `Float of float & 'e & 'f & 'g & 'h
- | `Int of int
- | `Kid of int & 'i & 'j & 'k & 'l
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- intval ty_process : tyval ty_thread : tyval encode :
- Output.t ->
- name:string ->
- ty:ty ->
- kid:int ->
- args:
- [< `Bool of bool & 'a & 'b & 'c & 'd & 'e & 'f & 'g
- | `Float of float & 'h & 'i & 'j & 'k & 'l & 'm & 'n
- | `Int of int
- | `Kid of int & 'o & 'p & 'q & 'r & 's & 't & 'u
- | `None
- | `String of string ]
- Arguments.t ->
- unit ->
- unitMetadata.Initialization_recordval encode : Output.t -> ticks_per_secs:int64 -> unit -> unitMetadata.Magic_recordFirst record in the trace
Metadata.Provider_infoval encode : Output.t -> id:int -> name:string -> unit -> unitMetadata.Provider_sectionMetadata.Trace_infoTrace_fuchsia_write.Metadatarecord type = 0
module Magic_record : sig ... endFirst record in the trace
module Initialization_record : sig ... endmodule Provider_info : sig ... endmodule Provider_section : sig ... endmodule Trace_info : sig ... endTrace_fuchsia_write.Outputval create : buf_pool:Buf_pool.t -> send_buf:(Buf.t -> unit) -> unit -> tval flush : t -> unitval max_size_word : t -> intMaximum size available, in words, for a single message
val into_buffer : buf_pool:Buf_pool.t -> Stdlib.Buffer.t -> tval dispose : t -> unitTrace_fuchsia_write.Str_refTrace_fuchsia_write.Thread_recordrecord type = 3
val encode : Output.t -> as_ref:int -> pid:int -> tid:int -> unit -> unitRecord that Thread_ref.ref as_ref represents the pair pid, tid
Trace_fuchsia_write.Thread_refval inline : pid:int -> tid:int -> tval ref : int -> tval size_word : t -> intval as_i8 : t -> int8-bit int for the reference
Trace_fuchsia_write.UtilTraceinclude module type of struct include Trace_core endUser defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = Trace_core.explicit_span = {span : span;Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.
mutable meta : Trace_core.Meta_map.t;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.
*)}Explicit span, with collector-specific metadata
module Collector = Trace_core.Collectormodule Meta_map = Trace_core.Meta_mapmodule Level = Trace_core.LevelIs there a collector?
This is fast, so that the traced program can check it before creating any span or message.
val set_default_level : Level.t -> unitSet level used for spans that do not specify it. The default default value is Level.Trace
val with_span :
- ?level:Level.t ->
+Trace (trace.Trace) Module Trace
include module type of struct include Trace_core end
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = Trace_core.explicit_span = {span : span;(*Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.
*)mutable meta : Trace_core.Meta_map.t;(*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.
*)
}Explicit span, with collector-specific metadata
module Collector = Trace_core.Collectormodule Meta_map = Trace_core.Meta_mapTracing
Is there a collector?
This is fast, so that the traced program can check it before creating any span or message.
val with_span :
?__FUNCTION__:string ->
__FILE__:string ->
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
(span -> 'a) ->
- 'awith_span ~__FILE__ ~__LINE__ name f enters a new span sp, and calls f sp. sp might be a dummy span if no collector is installed. When f sp returns or raises, the span sp is exited.
This is the recommended way to instrument most code.
val enter_span :
- ?level:Level.t ->
+ 'awith_span ~__FILE__ ~__LINE__ name f enters a new span sp, and calls f sp. sp might be a dummy span if no collector is installed. When f sp returns or raises, the span sp is exited.
This is the recommended way to instrument most code.
NOTE an important restriction is that this is only supposed to work for synchronous, direct style code. Monadic concurrency, Effect-based fibers, etc. might not play well with this style of spans on some or all backends. If you use cooperative concurrency, see enter_manual_span.
val enter_span :
?__FUNCTION__:string ->
__FILE__:string ->
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- spanEnter a span manually.
val exit_span : span -> unitExit a span manually. This must run on the same thread as the corresponding enter_span, and spans must nest correctly.
Add structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.
val enter_manual_sub_span :
+ spanval exit_span : span -> unitAdd structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.
val enter_manual_sub_span :
parent:explicit_span ->
?flavor:[ `Sync | `Async ] ->
- ?level:Level.t ->
?__FUNCTION__:string ->
__FILE__:string ->
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- explicit_spanLike with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.
val enter_manual_toplevel_span :
+ explicit_spanLike with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.
val enter_manual_toplevel_span :
?flavor:[ `Sync | `Async ] ->
- ?level:Level.t ->
?__FUNCTION__:string ->
__FILE__:string ->
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- explicit_spanLike with_span but the caller is responsible for carrying this explicit_span around until it's exited with exit_manual_span. The span can be used as a parent in enter_manual_sub_span.
val exit_manual_span : explicit_span -> unitExit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.
val add_data_to_manual_span :
+ explicit_spanLike with_span but the caller is responsible for carrying this explicit_span around until it's exited with exit_manual_span. The span can be used as a parent in enter_manual_sub_span.
val exit_manual_span : explicit_span -> unitExit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.
val add_data_to_manual_span :
explicit_span ->
(string * user_data) list ->
unitadd_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.
val message :
- ?level:Level.t ->
?span:span ->
?data:(unit -> (string * user_data) list) ->
string ->
- unitmessage msg logs a message msg (if a collector is installed). Additional metadata can be provided.
val messagef :
- ?level:Level.t ->
+ unitmessage msg logs a message msg (if a collector is installed). Additional metadata can be provided.
val messagef :
?span:span ->
?data:(unit -> (string * user_data) list) ->
((('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a) -> unit) ->
- unitmessagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.
Give a name to the current thread. This might be used by the collector to display traces in a more informative way.
Give a name to the current process. This might be used by the collector to display traces in a more informative way.
val counter_int :
- ?level:Level.t ->
+ unitmessagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.
Give a name to the current thread. This might be used by the collector to display traces in a more informative way.
Give a name to the current process. This might be used by the collector to display traces in a more informative way.
val counter_int :
?data:(unit -> (string * user_data) list) ->
string ->
int ->
- unitEmit a counter of type int. Counters represent the evolution of some quantity over time.
val counter_float :
- ?level:Level.t ->
+ unitEmit a counter of type int. Counters represent the evolution of some quantity over time.
val counter_float :
?data:(unit -> (string * user_data) list) ->
string ->
float ->
- unitEmit a counter of type float. See counter_int for more details.
Collector
type collector = (module Collector.S)An event collector.
See Collector for more details.
val setup_collector : collector -> unitsetup_collector c installs c as the current collector.
val get_current_level : unit -> Level.tGet current level. This is only meaningful if a collector was set up with setup_collector.
val set_current_level : Level.t -> unitSet the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.
\ No newline at end of file
+ unitEmit a counter of type float. See counter_int for more details.
type collector = (module Collector.S)An event collector.
See Collector for more details.
val setup_collector : collector -> unitsetup_collector c installs c as the current collector.
Trace_core.CollectorA global collector.
The collector, if present, is responsible for collecting messages and spans, and storing them, recording them, forward them, or offering them to other services and processes.
module type S = sig ... endSignature for a collector.
Collector.SSignature for a collector.
This is only relevant to implementors of tracing backends; to instrument your code you only need to look at the Trace module.
val with_span :
- __FUNCTION__:string option ->
- __FILE__:string ->
- __LINE__:int ->
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- (int64 -> 'a) ->
- 'aRun the function in a new span.
This replaces the previous enter_span and exit_span which were too flexible to be efficient to implement in async contexts.
val enter_span :
- __FUNCTION__:string option ->
- __FILE__:string ->
- __LINE__:int ->
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- int64Enter a new implicit span. For many uses cases, with_span will be easier to use.
Exit span. This should be called on the same thread as the corresponding enter_span, and nest properly with other calls to enter/exit_span and with_span.
val enter_manual_span :
- parent:Trace_core__.Types.explicit_span option ->
- flavor:[ `Sync | `Async ] option ->
- __FUNCTION__:string option ->
- __FILE__:string ->
- __LINE__:int ->
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- Trace_core__.Types.explicit_spanEnter an explicit span. Surrounding scope, if any, is provided by parent, and this function can store as much metadata as it wants in the hmap in the explicit_span's meta field.
This means that the collector doesn't need to implement contextual storage mapping span to scopes, metadata, etc. on its side; everything can be transmitted in the explicit_span.
val add_data_to_span :
- int64 ->
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- unit0.4
val add_data_to_manual_span :
- Trace_core__.Types.explicit_span ->
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- unitAdds data to the given span.
val message :
- ?span:int64 ->
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- unitEmit a message with associated metadata.
val counter_int :
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- int ->
- unitInteger counter.
Trace_core.LevelTracing levels.
This is similar to log levels in, say, Logs. In a thoroughly instrumented program, there will be a lot of spans, and enabling them all in production might slow down the application or overwhelm the tracing system; yet they might be useful in debug situations.
Level of tracing. These levels are in increasing order, i.e if level Debug1 is enabled, everything below it (Error, Warning, Info, etc.) are also enabled.
val to_string : t -> stringMeta_map.KeyMeta_map.MTrace_core.Meta_mapmodule type KEY_IMPL = sig ... endmodule Key : sig ... endtype 'a key = 'a Key.tmodule M : sig ... endval empty : tval cardinal : t -> intval length : t -> intMeta_map.KEY_IMPLTrace_coreTrace.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = {span : span;Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.
mutable meta : Meta_map.t;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.
*)}Explicit span, with collector-specific metadata
module Collector : sig ... endA global collector.
module Meta_map : sig ... endmodule Level : sig ... endTracing levels.
Is there a collector?
This is fast, so that the traced program can check it before creating any span or message.
val set_default_level : Level.t -> unitSet level used for spans that do not specify it. The default default value is Level.Trace
val with_span :
- ?level:Level.t ->
+Trace_core (trace.Trace_core) Module Trace_core
Trace.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = {span : span;(*Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.
*)mutable meta : Meta_map.t;(*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.
*)
}Explicit span, with collector-specific metadata
module Collector : sig ... endA global collector.
module Meta_map : sig ... endTracing
Is there a collector?
This is fast, so that the traced program can check it before creating any span or message.
val with_span :
?__FUNCTION__:string ->
__FILE__:string ->
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
(span -> 'a) ->
- 'awith_span ~__FILE__ ~__LINE__ name f enters a new span sp, and calls f sp. sp might be a dummy span if no collector is installed. When f sp returns or raises, the span sp is exited.
This is the recommended way to instrument most code.
val enter_span :
- ?level:Level.t ->
+ 'awith_span ~__FILE__ ~__LINE__ name f enters a new span sp, and calls f sp. sp might be a dummy span if no collector is installed. When f sp returns or raises, the span sp is exited.
This is the recommended way to instrument most code.
NOTE an important restriction is that this is only supposed to work for synchronous, direct style code. Monadic concurrency, Effect-based fibers, etc. might not play well with this style of spans on some or all backends. If you use cooperative concurrency, see enter_manual_span.
val enter_span :
?__FUNCTION__:string ->
__FILE__:string ->
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- spanEnter a span manually.
val exit_span : span -> unitExit a span manually. This must run on the same thread as the corresponding enter_span, and spans must nest correctly.
Add structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.
val enter_manual_sub_span :
+ spanval exit_span : span -> unitAdd structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.
val enter_manual_sub_span :
parent:explicit_span ->
?flavor:[ `Sync | `Async ] ->
- ?level:Level.t ->
?__FUNCTION__:string ->
__FILE__:string ->
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- explicit_spanLike with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.
val enter_manual_toplevel_span :
+ explicit_spanLike with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.
val enter_manual_toplevel_span :
?flavor:[ `Sync | `Async ] ->
- ?level:Level.t ->
?__FUNCTION__:string ->
__FILE__:string ->
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- explicit_spanLike with_span but the caller is responsible for carrying this explicit_span around until it's exited with exit_manual_span. The span can be used as a parent in enter_manual_sub_span.
val exit_manual_span : explicit_span -> unitExit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.
val add_data_to_manual_span :
+ explicit_spanLike with_span but the caller is responsible for carrying this explicit_span around until it's exited with exit_manual_span. The span can be used as a parent in enter_manual_sub_span.
val exit_manual_span : explicit_span -> unitExit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.
val add_data_to_manual_span :
explicit_span ->
(string * user_data) list ->
unitadd_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.
val message :
- ?level:Level.t ->
?span:span ->
?data:(unit -> (string * user_data) list) ->
string ->
- unitmessage msg logs a message msg (if a collector is installed). Additional metadata can be provided.
val messagef :
- ?level:Level.t ->
+ unitmessage msg logs a message msg (if a collector is installed). Additional metadata can be provided.
val messagef :
?span:span ->
?data:(unit -> (string * user_data) list) ->
((('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a) -> unit) ->
- unitmessagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.
Give a name to the current thread. This might be used by the collector to display traces in a more informative way.
Give a name to the current process. This might be used by the collector to display traces in a more informative way.
val counter_int :
- ?level:Level.t ->
+ unitmessagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.
Give a name to the current thread. This might be used by the collector to display traces in a more informative way.
Give a name to the current process. This might be used by the collector to display traces in a more informative way.
val counter_int :
?data:(unit -> (string * user_data) list) ->
string ->
int ->
- unitEmit a counter of type int. Counters represent the evolution of some quantity over time.
val counter_float :
- ?level:Level.t ->
+ unitEmit a counter of type int. Counters represent the evolution of some quantity over time.
val counter_float :
?data:(unit -> (string * user_data) list) ->
string ->
float ->
- unitEmit a counter of type float. See counter_int for more details.
Collector
type collector = (module Collector.S)An event collector.
See Collector for more details.
val setup_collector : collector -> unitsetup_collector c installs c as the current collector.
val get_current_level : unit -> Level.tGet current level. This is only meaningful if a collector was set up with setup_collector.
val set_current_level : Level.t -> unitSet the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.
\ No newline at end of file
+ unitEmit a counter of type float. See counter_int for more details.
type collector = (module Collector.S)An event collector.
See Collector for more details.
val setup_collector : collector -> unitsetup_collector c installs c as the current collector.