From cfbf45dffd9b1d72496ecb8797b79a68f63b3564 Mon Sep 17 00:00:00 2001 From: c-cube Date: Sat, 24 Feb 2024 16:31:29 +0000 Subject: [PATCH] deploy: 771193e15c15382460a313435f5356c1a6bd32e8 --- trace/Trace/index.html | 2 +- trace/Trace_core/Collector/index.html | 2 + .../Collector/module-type-S/index.html | 95 +++++++++++++++++++ trace/Trace_core/Meta_map/Key/index.html | 2 + trace/Trace_core/Meta_map/M/index.html | 6 ++ trace/Trace_core/Meta_map/index.html | 2 + .../Meta_map/module-type-KEY_IMPL/index.html | 2 + trace/Trace_core/index.html | 2 +- 8 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 trace/Trace_core/Collector/index.html create mode 100644 trace/Trace_core/Collector/module-type-S/index.html create mode 100644 trace/Trace_core/Meta_map/Key/index.html create mode 100644 trace/Trace_core/Meta_map/M/index.html create mode 100644 trace/Trace_core/Meta_map/index.html create mode 100644 trace/Trace_core/Meta_map/module-type-KEY_IMPL/index.html diff --git a/trace/Trace/index.html b/trace/Trace/index.html index 37e0e16..06dc7fe 100644 --- a/trace/Trace/index.html +++ b/trace/Trace/index.html @@ -1,5 +1,5 @@ -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)

    *)
}

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 : +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 -> diff --git a/trace/Trace_core/Collector/index.html b/trace/Trace_core/Collector/index.html new file mode 100644 index 0000000..015d582 --- /dev/null +++ b/trace/Trace_core/Collector/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 0000000..74c76cd --- /dev/null +++ b/trace/Trace_core/Collector/module-type-S/index.html @@ -0,0 +1,95 @@ + +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/Meta_map/Key/index.html b/trace/Trace_core/Meta_map/Key/index.html new file mode 100644 index 0000000..47f7197 --- /dev/null +++ b/trace/Trace_core/Meta_map/Key/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 0000000..e3797f1 --- /dev/null +++ b/trace/Trace_core/Meta_map/M/index.html @@ -0,0 +1,6 @@ + +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 new file mode 100644 index 0000000..d0f8fd1 --- /dev/null +++ b/trace/Trace_core/Meta_map/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 0000000..cfe5620 --- /dev/null +++ b/trace/Trace_core/Meta_map/module-type-KEY_IMPL/index.html @@ -0,0 +1,2 @@ + +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 5b1473a..2e3c3e5 100644 --- a/trace/Trace_core/index.html +++ b/trace/Trace_core/index.html @@ -1,5 +1,5 @@ -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)

    *)
}

Explicit span, with collector-specific metadata

module Collector : sig ... end

A global collector.

module Meta_map : sig ... end

Associative containers with Heterogeneous Values

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