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 @@ - -Argument (trace-fuchsia.Trace_fuchsia_write.Argument)

Module Trace_fuchsia_write.Argument

type 'a t = string * [< user_data | `Kid of int ] as 'a
val check_valid_ : - [< `Bool of bool - | `Float of float - | `Int of int - | `Kid of int - | `None - | `String of string ] - t -> - unit
val is_i32_ : int -> bool
val size_word : - [< `Bool of bool & 'a - | `Float of float & 'b - | `Int of int - | `Kid of int & 'c - | `None - | `String of string ] - t -> - int
val encode : - Buf.t -> - [< `Bool of bool & 'a - | `Float of float & 'b - | `Int of int - | `Kid of int & 'c - | `None - | `String of string ] - t -> - unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Arguments/index.html b/trace-fuchsia/Trace_fuchsia_write/Arguments/index.html deleted file mode 100644 index 50fa497..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Arguments/index.html +++ /dev/null @@ -1,35 +0,0 @@ - -Arguments (trace-fuchsia.Trace_fuchsia_write.Arguments)

Module Trace_fuchsia_write.Arguments

type 'a t = 'a Argument.t list
val len : - [< `Bool of bool - | `Float of float - | `Int of int - | `Kid of int - | `None - | `String of string ] - t -> - int
val check_valid : - [< `Bool of bool - | `Float of float - | `Int of int - | `Kid of int - | `None - | `String of string ] - t -> - unit
val 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 -> - int
val encode : - Buf.t -> - [< `Bool of bool & 'a & 'b & 'c - | `Float of float & 'd & 'e & 'f - | `Int of int - | `Kid of int & 'g & 'h & 'i - | `None - | `String of string ] - t -> - unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Buf/index.html b/trace-fuchsia/Trace_fuchsia_write/Buf/index.html deleted file mode 100644 index 4e45874..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Buf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Buf (trace-fuchsia.Trace_fuchsia_write.Buf)

Module Trace_fuchsia_write.Buf

type t = {
  1. buf : bytes;
  2. mutable offset : int;
}
val empty : t
val create : int -> t
val clear : t -> unit
val available : t -> int
val size : t -> int
val add_i64 : t -> int64 -> unit
val add_string : t -> string -> unit
val to_string : t -> string
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Buf_pool/List_with_len/index.html b/trace-fuchsia/Trace_fuchsia_write/Buf_pool/List_with_len/index.html deleted file mode 100644 index c6a8c2c..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Buf_pool/List_with_len/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -List_with_len (trace-fuchsia.Trace_fuchsia_write.Buf_pool.List_with_len)

Module Buf_pool.List_with_len

type +'a t =
  1. | Nil
  2. | Cons of int * 'a * 'a t
val empty : 'a t
val len : 'a t -> int
val cons : 'a -> 'b t -> 'b t
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Buf_pool/index.html b/trace-fuchsia/Trace_fuchsia_write/Buf_pool/index.html deleted file mode 100644 index 30a639b..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Buf_pool/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Buf_pool (trace-fuchsia.Trace_fuchsia_write.Buf_pool)

Module Trace_fuchsia_write.Buf_pool

module List_with_len : sig ... end
type t = {
  1. max_len : int;
  2. buf_size : int;
  3. bufs : Buf.t List_with_len.t {A}1.t;
}
val create : ?max_len:int -> ?buf_size:int -> unit -> t
val alloc : t -> Buf.t
val recycle : t -> Buf.t -> unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Event/Async_begin/index.html b/trace-fuchsia/Trace_fuchsia_write/Event/Async_begin/index.html deleted file mode 100644 index 59e235f..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Event/Async_begin/index.html +++ /dev/null @@ -1,29 +0,0 @@ - -Async_begin (trace-fuchsia.Trace_fuchsia_write.Event.Async_begin)

Module Event.Async_begin

type=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 -> - int
val 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 -> - unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Event/Async_end/index.html b/trace-fuchsia/Trace_fuchsia_write/Event/Async_end/index.html deleted file mode 100644 index 90ef4d8..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Event/Async_end/index.html +++ /dev/null @@ -1,29 +0,0 @@ - -Async_end (trace-fuchsia.Trace_fuchsia_write.Event.Async_end)

Module Event.Async_end

type=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 -> - int
val 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 -> - unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Event/Counter/index.html b/trace-fuchsia/Trace_fuchsia_write/Event/Counter/index.html deleted file mode 100644 index 8ef25ce..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Event/Counter/index.html +++ /dev/null @@ -1,28 +0,0 @@ - -Counter (trace-fuchsia.Trace_fuchsia_write.Event.Counter)

Module Event.Counter

type=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 -> - int
val 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 -> - unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Event/Duration_begin/index.html b/trace-fuchsia/Trace_fuchsia_write/Event/Duration_begin/index.html deleted file mode 100644 index a7a18f5..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Event/Duration_begin/index.html +++ /dev/null @@ -1,28 +0,0 @@ - -Duration_begin (trace-fuchsia.Trace_fuchsia_write.Event.Duration_begin)

Module Event.Duration_begin

type=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 -> - int
val 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 -> - unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Event/Duration_complete/index.html b/trace-fuchsia/Trace_fuchsia_write/Event/Duration_complete/index.html deleted file mode 100644 index c0e4101..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Event/Duration_complete/index.html +++ /dev/null @@ -1,29 +0,0 @@ - -Duration_complete (trace-fuchsia.Trace_fuchsia_write.Event.Duration_complete)

Module Event.Duration_complete

type=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 -> - int
val 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 -> - unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Event/Duration_end/index.html b/trace-fuchsia/Trace_fuchsia_write/Event/Duration_end/index.html deleted file mode 100644 index 34dbd6f..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Event/Duration_end/index.html +++ /dev/null @@ -1,28 +0,0 @@ - -Duration_end (trace-fuchsia.Trace_fuchsia_write.Event.Duration_end)

Module Event.Duration_end

type=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 -> - int
val 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 -> - unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Event/Instant/index.html b/trace-fuchsia/Trace_fuchsia_write/Event/Instant/index.html deleted file mode 100644 index 9a897ed..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Event/Instant/index.html +++ /dev/null @@ -1,28 +0,0 @@ - -Instant (trace-fuchsia.Trace_fuchsia_write.Event.Instant)

Module Event.Instant

type=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 -> - int
val 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 -> - unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Event/index.html b/trace-fuchsia/Trace_fuchsia_write/Event/index.html deleted file mode 100644 index fa86666..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Event/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Event (trace-fuchsia.Trace_fuchsia_write.Event)

Module Trace_fuchsia_write.Event

record type = 4

module Instant : sig ... end

type=0

module Counter : sig ... end

type=1

module Duration_begin : sig ... end

type=2

module Duration_end : sig ... end

type=3

module Duration_complete : sig ... end

type=4

module Async_begin : sig ... end

type=5

module Async_end : sig ... end

type=7

\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/I64/index.html b/trace-fuchsia/Trace_fuchsia_write/I64/index.html deleted file mode 100644 index 8b1ae21..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/I64/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -I64 (trace-fuchsia.Trace_fuchsia_write.I64)

Module Trace_fuchsia_write.I64

include module type of struct include Stdlib.Int64 end
val zero : int64
val one : int64
val minus_one : int64
val neg : int64 -> int64
val add : int64 -> int64 -> int64
val sub : int64 -> int64 -> int64
val mul : int64 -> int64 -> int64
val div : int64 -> int64 -> int64
val unsigned_div : int64 -> int64 -> int64
val rem : int64 -> int64 -> int64
val unsigned_rem : int64 -> int64 -> int64
val succ : int64 -> int64
val pred : int64 -> int64
val abs : int64 -> int64
val max_int : int64
val min_int : int64
val logand : int64 -> int64 -> int64
val logor : int64 -> int64 -> int64
val logxor : int64 -> int64 -> int64
val lognot : int64 -> int64
val shift_left : int64 -> int -> int64
val shift_right : int64 -> int -> int64
val shift_right_logical : int64 -> int -> int64
val of_int : int -> int64
val to_int : int64 -> int
val unsigned_to_int : int64 -> int option
val of_float : float -> int64
val to_float : int64 -> float
val of_int32 : int32 -> int64
val to_int32 : int64 -> int32
val of_nativeint : nativeint -> int64
val to_nativeint : int64 -> nativeint
val of_string : string -> int64
val of_string_opt : string -> int64 option
val to_string : int64 -> string
val bits_of_float : float -> int64
val float_of_bits : int64 -> float
type t = int64
val compare : t -> t -> int
val unsigned_compare : t -> t -> int
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val (+) : int64 -> int64 -> int64
val (-) : int64 -> int64 -> int64
val (=) : t -> t -> bool
val (land) : int64 -> int64 -> int64
val (lor) : int64 -> int64 -> int64
val lnot : int64 -> int64
val (lsl) : int64 -> int -> int64
val (lsr) : int64 -> int -> int64
val (asr) : int64 -> int -> int64
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Kernel_object/index.html b/trace-fuchsia/Trace_fuchsia_write/Kernel_object/index.html deleted file mode 100644 index 66caca8..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Kernel_object/index.html +++ /dev/null @@ -1,27 +0,0 @@ - -Kernel_object (trace-fuchsia.Trace_fuchsia_write.Kernel_object)

Module Trace_fuchsia_write.Kernel_object

record 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 -> - int
type ty = int
val ty_process : ty
val ty_thread : ty
val 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 -> - unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Metadata/Initialization_record/index.html b/trace-fuchsia/Trace_fuchsia_write/Metadata/Initialization_record/index.html deleted file mode 100644 index 78ba8ee..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Metadata/Initialization_record/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Initialization_record (trace-fuchsia.Trace_fuchsia_write.Metadata.Initialization_record)

Module Metadata.Initialization_record

val size_word : int
val default_ticks_per_sec : int64

Default: 1 tick = 1 ns

val encode : Output.t -> ticks_per_secs:int64 -> unit -> unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Metadata/Magic_record/index.html b/trace-fuchsia/Trace_fuchsia_write/Metadata/Magic_record/index.html deleted file mode 100644 index c10d9c0..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Metadata/Magic_record/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Magic_record (trace-fuchsia.Trace_fuchsia_write.Metadata.Magic_record)

Module Metadata.Magic_record

First record in the trace

val value : int64
val size_word : int
val encode : Output.t -> unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Metadata/Provider_info/index.html b/trace-fuchsia/Trace_fuchsia_write/Metadata/Provider_info/index.html deleted file mode 100644 index 22ad0f6..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Metadata/Provider_info/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Provider_info (trace-fuchsia.Trace_fuchsia_write.Metadata.Provider_info)

Module Metadata.Provider_info

val size_word : name:string -> unit -> int
val encode : Output.t -> id:int -> name:string -> unit -> unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Metadata/Provider_section/index.html b/trace-fuchsia/Trace_fuchsia_write/Metadata/Provider_section/index.html deleted file mode 100644 index 080ba66..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Metadata/Provider_section/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Provider_section (trace-fuchsia.Trace_fuchsia_write.Metadata.Provider_section)

Module Metadata.Provider_section

\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Metadata/Trace_info/index.html b/trace-fuchsia/Trace_fuchsia_write/Metadata/Trace_info/index.html deleted file mode 100644 index 583244c..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Metadata/Trace_info/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Trace_info (trace-fuchsia.Trace_fuchsia_write.Metadata.Trace_info)

Module Metadata.Trace_info

\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Metadata/index.html b/trace-fuchsia/Trace_fuchsia_write/Metadata/index.html deleted file mode 100644 index 63704cd..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Metadata/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Metadata (trace-fuchsia.Trace_fuchsia_write.Metadata)

Module Trace_fuchsia_write.Metadata

record type = 0

module Magic_record : sig ... end

First record in the trace

module Initialization_record : sig ... end
module Provider_info : sig ... end
module Provider_section : sig ... end
module Trace_info : sig ... end
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Output/index.html b/trace-fuchsia/Trace_fuchsia_write/Output/index.html deleted file mode 100644 index bbcb4fc..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Output/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Output (trace-fuchsia.Trace_fuchsia_write.Output)

Module Trace_fuchsia_write.Output

type t = {
  1. mutable buf : Buf.t;
  2. mutable send_buf : Buf.t -> unit;
  3. buf_pool : Buf_pool.t;
}
val create : buf_pool:Buf_pool.t -> send_buf:(Buf.t -> unit) -> unit -> t
val flush : t -> unit
val max_size_word : t -> int

Maximum size available, in words, for a single message

val get_buf : t -> available_word:int -> Buf.t

Obtain a buffer with at least available bytes

val into_buffer : buf_pool:Buf_pool.t -> Stdlib.Buffer.t -> t
val dispose : t -> unit
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Str_ref/index.html b/trace-fuchsia/Trace_fuchsia_write/Str_ref/index.html deleted file mode 100644 index 2f2f47a..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Str_ref/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Str_ref (trace-fuchsia.Trace_fuchsia_write.Str_ref)

Module Trace_fuchsia_write.Str_ref

type t = int

16 bits

val inline_fail_ : unit -> 'a
val inline : int -> t
\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Thread_record/index.html b/trace-fuchsia/Trace_fuchsia_write/Thread_record/index.html deleted file mode 100644 index 7cb9636..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Thread_record/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Thread_record (trace-fuchsia.Trace_fuchsia_write.Thread_record)

Module Trace_fuchsia_write.Thread_record

record type = 3

val size_word : int
val encode : Output.t -> as_ref:int -> pid:int -> tid:int -> unit -> unit

Record that Thread_ref.ref as_ref represents the pair pid, tid

\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Thread_ref/index.html b/trace-fuchsia/Trace_fuchsia_write/Thread_ref/index.html deleted file mode 100644 index b8e7360..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Thread_ref/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Thread_ref (trace-fuchsia.Trace_fuchsia_write.Thread_ref)

Module Trace_fuchsia_write.Thread_ref

type t =
  1. | Ref of int
  2. | Inline of {
    1. pid : int;
    2. tid : int;
    }
val inline : pid:int -> tid:int -> t
val ref : int -> t
val size_word : t -> int
val as_i8 : t -> int

8-bit int for the reference

\ No newline at end of file diff --git a/trace-fuchsia/Trace_fuchsia_write/Util/index.html b/trace-fuchsia/Trace_fuchsia_write/Util/index.html deleted file mode 100644 index 5b842e7..0000000 --- a/trace-fuchsia/Trace_fuchsia_write/Util/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Util (trace-fuchsia.Trace_fuchsia_write.Util)

Module Trace_fuchsia_write.Util

val missing_to_round : int -> int

How many bytes are missing for n to be a multiple of 8

val round_to_word : int -> int

Round up to a multiple of 8

\ No newline at end of file diff --git a/trace/Trace/index.html b/trace/Trace/index.html index 0188d8a..06dc7fe 100644 --- a/trace/Trace/index.html +++ b/trace/Trace/index.html @@ -1,57 +1,49 @@ -Trace (trace.Trace)

Module Trace

include module type of struct include Trace_core end
type span = int64

A span identifier.

The meaning of the identifier depends on the collector.

type user_data = [
  1. | `Int of int
  2. | `String of string
  3. | `Bool of bool
  4. | `Float of float
  5. | `None
]

User defined data, generally passed as key/value pairs to whatever collector is installed (if any).

type explicit_span = Trace_core.explicit_span = {
  1. span : span;
    (*

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

    *)
  2. 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.Collector
module Meta_map = Trace_core.Meta_map
module Level = Trace_core.Level

Tracing

val enabled : unit -> bool

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 -> unit

Set 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
type span = int64

A span identifier.

The meaning of the identifier depends on the collector.

type user_data = [
  1. | `Int of int
  2. | `String of string
  3. | `Bool of bool
  4. | `Float of float
  5. | `None
]

User defined data, generally passed as key/value pairs to whatever collector is installed (if any).

type explicit_span = Trace_core.explicit_span = {
  1. span : span;
    (*

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

    *)
  2. 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.Collector
module Meta_map = Trace_core.Meta_map

Tracing

val enabled : unit -> bool

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) -> - 'a

with_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.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

    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 : - ?level:Level.t -> + 'a

with_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 -> - span

Enter a span manually.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

val exit_span : span -> unit

Exit a span manually. This must run on the same thread as the corresponding enter_span, and spans must nest correctly.

val add_data_to_span : span -> (string * user_data) list -> unit

Add structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.

  • since 0.4
val enter_manual_sub_span : + span
val exit_span : span -> unit
val add_data_to_span : span -> (string * user_data) list -> unit

Add structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.

  • since 0.4
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_span

Like 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.

  • parameter flavor

    a description of the span that can be used by the Collector.S to decide how to represent the span. Typically, `Sync spans start and stop on one thread, and are nested purely by their timestamp; and `Async spans can overlap, migrate between threads, etc. (as happens in Lwt, Eio, Async, etc.) which impacts how the collector might represent them.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

  • since 0.3
val enter_manual_toplevel_span : + explicit_span

Like 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.

  • parameter flavor

    a description of the span that can be used by the Collector.S to decide how to represent the span. Typically, `Sync spans start and stop on one thread, and are nested purely by their timestamp; and `Async spans can overlap, migrate between threads, etc. (as happens in Lwt, Eio, Async, etc.) which impacts how the collector might represent them.

  • since 0.3
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_span

Like 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.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

  • since 0.3
val exit_manual_span : explicit_span -> unit

Exit 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.

  • since 0.3
val add_data_to_manual_span : + explicit_span

Like 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.

  • since 0.3
val exit_manual_span : explicit_span -> unit

Exit 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.

  • since 0.3
val add_data_to_manual_span : explicit_span -> (string * user_data) list -> unit

add_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.

  • since 0.4
val message : - ?level:Level.t -> ?span:span -> ?data:(unit -> (string * user_data) list) -> string -> - unit

message msg logs a message msg (if a collector is installed). Additional metadata can be provided.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

  • parameter span

    the surrounding span, if any. This might be ignored by the collector.

val messagef : - ?level:Level.t -> + unit

message msg logs a message msg (if a collector is installed). Additional metadata can be provided.

  • parameter span

    the surrounding span, if any. This might be ignored by the collector.

val messagef : ?span:span -> ?data:(unit -> (string * user_data) list) -> ((('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a) -> unit) -> - unit

messagef (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.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

val set_thread_name : string -> unit

Give a name to the current thread. This might be used by the collector to display traces in a more informative way.

val set_process_name : string -> unit

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 -> + unit

messagef (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.

val set_thread_name : string -> unit

Give a name to the current thread. This might be used by the collector to display traces in a more informative way.

val set_process_name : string -> unit

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 -> - unit

Emit a counter of type int. Counters represent the evolution of some quantity over time.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

  • parameter data

    metadata for this metric (since 0.4)

val counter_float : - ?level:Level.t -> + unit

Emit a counter of type int. Counters represent the evolution of some quantity over time.

  • parameter data

    metadata for this metric (since 0.4)

val counter_float : ?data:(unit -> (string * user_data) list) -> string -> float -> - unit

Emit a counter of type float. See counter_int for more details.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

  • parameter data

    metadata for this metric (since 0.4)

Collector

type collector = (module Collector.S)

An event collector.

See Collector for more details.

val setup_collector : collector -> unit

setup_collector c installs c as the current collector.

  • raises Invalid_argument

    if there already is an established collector.

val get_current_level : unit -> Level.t

Get current level. This is only meaningful if a collector was set up with setup_collector.

  • since NEXT_RELEASE
val set_current_level : Level.t -> unit

Set the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.

  • since NEXT_RELEASE
val shutdown : unit -> unit

shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.

\ No newline at end of file + unit

Emit a counter of type float. See counter_int for more details.

  • parameter data

    metadata for this metric (since 0.4)

Collector

type collector = (module Collector.S)

An event collector.

See Collector for more details.

val setup_collector : collector -> unit

setup_collector c installs c as the current collector.

  • raises Invalid_argument

    if there already is an established collector.

val shutdown : unit -> unit

shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.

\ No newline at end of file diff --git a/trace/Trace_core/Collector/index.html b/trace/Trace_core/Collector/index.html deleted file mode 100644 index 015d582..0000000 --- a/trace/Trace_core/Collector/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Collector (trace.Trace_core.Collector)

Module Trace_core.Collector

A 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.

val dummy_span : int64
val dummy_explicit_span : Trace_core__.Types.explicit_span
module type S = sig ... end

Signature for a collector.

\ No newline at end of file diff --git a/trace/Trace_core/Collector/module-type-S/index.html b/trace/Trace_core/Collector/module-type-S/index.html deleted file mode 100644 index 74c76cd..0000000 --- a/trace/Trace_core/Collector/module-type-S/index.html +++ /dev/null @@ -1,95 +0,0 @@ - -S (trace.Trace_core.Collector.S)

Module type Collector.S

Signature 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) -> - 'a

Run 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.

  • since 0.3
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 -> - int64

Enter a new implicit span. For many uses cases, with_span will be easier to use.

  • since 0.6
val exit_span : int64 -> unit

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.

  • since 0.6
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_span

Enter 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.

  • since 0.3
val exit_manual_span : Trace_core__.Types.explicit_span -> unit

Exit an explicit span.

  • since 0.3
val add_data_to_span : - int64 -> - (string - * [ `Int of int - | `String of string - | `Bool of bool - | `Float of float - | `None ]) - list -> - unit
  • since Adds data to the current span.

0.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 -> - unit

Adds data to the given span.

  • since 0.4
val message : - ?span:int64 -> - data: - (string - * [ `Int of int - | `String of string - | `Bool of bool - | `Float of float - | `None ]) - list -> - string -> - unit

Emit a message with associated metadata.

val name_thread : string -> unit

Give a name to the current thread.

val name_process : string -> unit

Give a name to the current process.

val counter_int : - data: - (string - * [ `Int of int - | `String of string - | `Bool of bool - | `Float of float - | `None ]) - list -> - string -> - int -> - unit

Integer counter.

val counter_float : - data: - (string - * [ `Int of int - | `String of string - | `Bool of bool - | `Float of float - | `None ]) - list -> - string -> - float -> - unit

Float counter.

val shutdown : unit -> unit

Shutdown collector, possibly waiting for it to finish sending data.

\ No newline at end of file diff --git a/trace/Trace_core/Level/index.html b/trace/Trace_core/Level/index.html deleted file mode 100644 index 258d66a..0000000 --- a/trace/Trace_core/Level/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Level (trace.Trace_core.Level)

Module Trace_core.Level

Tracing 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.

type t =
  1. | Error
    (*

    Only errors

    *)
  2. | Warning
    (*

    Warnings

    *)
  3. | Info
  4. | Debug1
    (*

    Least verbose debugging level

    *)
  5. | Debug2
    (*

    Intermediate verbosity debugging level

    *)
  6. | Debug3
    (*

    Maximum verbosity debugging level

    *)
  7. | Trace
    (*

    Enable everything (default level)

    *)

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.

  • since NEXT_RELEASE
val to_string : t -> string
  • since NEXT_RELEASE
val leq : t -> t -> bool
\ No newline at end of file diff --git a/trace/Trace_core/Meta_map/Key/index.html b/trace/Trace_core/Meta_map/Key/index.html deleted file mode 100644 index 47f7197..0000000 --- a/trace/Trace_core/Meta_map/Key/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Key (trace.Trace_core.Meta_map.Key)

Module Meta_map.Key

type 'a t = (module KEY_IMPL with type t = 'a)
val _n : int Stdlib.ref
val create : unit -> (module KEY_IMPL with type t = 'k)
val id : (module KEY_IMPL with type t = 'k) -> int
val equal : 'a 'b. 'a t -> 'b t -> bool
\ No newline at end of file diff --git a/trace/Trace_core/Meta_map/M/index.html b/trace/Trace_core/Meta_map/M/index.html deleted file mode 100644 index e3797f1..0000000 --- a/trace/Trace_core/Meta_map/M/index.html +++ /dev/null @@ -1,6 +0,0 @@ - -M (trace.Trace_core.Meta_map.M)

Module Meta_map.M

type key = int
type !+'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge : - (key -> 'a option -> 'b option -> 'c option) -> - 'a t -> - 'b t -> - 'c t
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val min_binding_opt : 'a t -> (key * 'a) option
val max_binding : 'a t -> key * 'a
val max_binding_opt : 'a t -> (key * 'a) option
val choose : 'a t -> key * 'a
val choose_opt : 'a t -> (key * 'a) option
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val find_first : (key -> bool) -> 'a t -> key * 'a
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
val find_last : (key -> bool) -> 'a t -> key * 'a
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
\ No newline at end of file diff --git a/trace/Trace_core/Meta_map/index.html b/trace/Trace_core/Meta_map/index.html deleted file mode 100644 index d0f8fd1..0000000 --- a/trace/Trace_core/Meta_map/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Meta_map (trace.Trace_core.Meta_map)

Module Trace_core.Meta_map

module type KEY_IMPL = sig ... end
module Key : sig ... end
type 'a key = 'a Key.t
type binding =
  1. | B : 'a Key.t * 'a -> binding
module M : sig ... end
type t = {
  1. m : {exn_pair}1 M.t;
}
val empty : t
val mem : (module KEY_IMPL with type t = 'a) -> t -> bool
val find_exn : 'a Key.t -> t -> 'a0
val find : 'a Key.t -> t -> 'b option
val add : 'a Key.t -> 'a0 -> t -> t
val remove : 'a Key.t -> t -> t
val cardinal : t -> int
val length : t -> int
val iter : (binding -> unit) -> t -> unit
val to_list : t -> binding list
val add_list : t -> binding list -> t
\ No newline at end of file diff --git a/trace/Trace_core/Meta_map/module-type-KEY_IMPL/index.html b/trace/Trace_core/Meta_map/module-type-KEY_IMPL/index.html deleted file mode 100644 index cfe5620..0000000 --- a/trace/Trace_core/Meta_map/module-type-KEY_IMPL/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -KEY_IMPL (trace.Trace_core.Meta_map.KEY_IMPL)

Module type Meta_map.KEY_IMPL

type t
exception Store of t
val id : int
\ No newline at end of file diff --git a/trace/Trace_core/index.html b/trace/Trace_core/index.html index d742240..2e3c3e5 100644 --- a/trace/Trace_core/index.html +++ b/trace/Trace_core/index.html @@ -1,57 +1,49 @@ -Trace_core (trace.Trace_core)

Module Trace_core

Trace.

type span = int64

A span identifier.

The meaning of the identifier depends on the collector.

type user_data = [
  1. | `Int of int
  2. | `String of string
  3. | `Bool of bool
  4. | `Float of float
  5. | `None
]

User defined data, generally passed as key/value pairs to whatever collector is installed (if any).

type explicit_span = {
  1. span : span;
    (*

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

    *)
  2. 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 ... end

A global collector.

module Meta_map : sig ... end
module Level : sig ... end

Tracing levels.

Tracing

val enabled : unit -> bool

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 -> unit

Set 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.

type span = int64

A span identifier.

The meaning of the identifier depends on the collector.

type user_data = [
  1. | `Int of int
  2. | `String of string
  3. | `Bool of bool
  4. | `Float of float
  5. | `None
]

User defined data, generally passed as key/value pairs to whatever collector is installed (if any).

type explicit_span = {
  1. span : span;
    (*

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

    *)
  2. 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 ... end

A global collector.

module Meta_map : sig ... end

Tracing

val enabled : unit -> bool

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) -> - 'a

with_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.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

    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 : - ?level:Level.t -> + 'a

with_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 -> - span

Enter a span manually.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

val exit_span : span -> unit

Exit a span manually. This must run on the same thread as the corresponding enter_span, and spans must nest correctly.

val add_data_to_span : span -> (string * user_data) list -> unit

Add structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.

  • since 0.4
val enter_manual_sub_span : + span
val exit_span : span -> unit
val add_data_to_span : span -> (string * user_data) list -> unit

Add structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.

  • since 0.4
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_span

Like 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.

  • parameter flavor

    a description of the span that can be used by the Collector.S to decide how to represent the span. Typically, `Sync spans start and stop on one thread, and are nested purely by their timestamp; and `Async spans can overlap, migrate between threads, etc. (as happens in Lwt, Eio, Async, etc.) which impacts how the collector might represent them.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

  • since 0.3
val enter_manual_toplevel_span : + explicit_span

Like 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.

  • parameter flavor

    a description of the span that can be used by the Collector.S to decide how to represent the span. Typically, `Sync spans start and stop on one thread, and are nested purely by their timestamp; and `Async spans can overlap, migrate between threads, etc. (as happens in Lwt, Eio, Async, etc.) which impacts how the collector might represent them.

  • since 0.3
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_span

Like 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.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

  • since 0.3
val exit_manual_span : explicit_span -> unit

Exit 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.

  • since 0.3
val add_data_to_manual_span : + explicit_span

Like 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.

  • since 0.3
val exit_manual_span : explicit_span -> unit

Exit 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.

  • since 0.3
val add_data_to_manual_span : explicit_span -> (string * user_data) list -> unit

add_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.

  • since 0.4
val message : - ?level:Level.t -> ?span:span -> ?data:(unit -> (string * user_data) list) -> string -> - unit

message msg logs a message msg (if a collector is installed). Additional metadata can be provided.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

  • parameter span

    the surrounding span, if any. This might be ignored by the collector.

val messagef : - ?level:Level.t -> + unit

message msg logs a message msg (if a collector is installed). Additional metadata can be provided.

  • parameter span

    the surrounding span, if any. This might be ignored by the collector.

val messagef : ?span:span -> ?data:(unit -> (string * user_data) list) -> ((('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a) -> unit) -> - unit

messagef (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.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

val set_thread_name : string -> unit

Give a name to the current thread. This might be used by the collector to display traces in a more informative way.

val set_process_name : string -> unit

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 -> + unit

messagef (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.

val set_thread_name : string -> unit

Give a name to the current thread. This might be used by the collector to display traces in a more informative way.

val set_process_name : string -> unit

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 -> - unit

Emit a counter of type int. Counters represent the evolution of some quantity over time.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

  • parameter data

    metadata for this metric (since 0.4)

val counter_float : - ?level:Level.t -> + unit

Emit a counter of type int. Counters represent the evolution of some quantity over time.

  • parameter data

    metadata for this metric (since 0.4)

val counter_float : ?data:(unit -> (string * user_data) list) -> string -> float -> - unit

Emit a counter of type float. See counter_int for more details.

  • parameter level

    optional level for this span. since NEXT_RELEASE. Default is set via set_default_level.

  • parameter data

    metadata for this metric (since 0.4)

Collector

type collector = (module Collector.S)

An event collector.

See Collector for more details.

val setup_collector : collector -> unit

setup_collector c installs c as the current collector.

  • raises Invalid_argument

    if there already is an established collector.

val get_current_level : unit -> Level.t

Get current level. This is only meaningful if a collector was set up with setup_collector.

  • since NEXT_RELEASE
val set_current_level : Level.t -> unit

Set the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.

  • since NEXT_RELEASE
val shutdown : unit -> unit

shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.

\ No newline at end of file + unit

Emit a counter of type float. See counter_int for more details.

  • parameter data

    metadata for this metric (since 0.4)

Collector

type collector = (module Collector.S)

An event collector.

See Collector for more details.

val setup_collector : collector -> unit

setup_collector c installs c as the current collector.

  • raises Invalid_argument

    if there already is an established collector.

val shutdown : unit -> unit

shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.

\ No newline at end of file