diff --git a/dev/opentelemetry/Opentelemetry/Scope/index.html b/dev/opentelemetry/Opentelemetry/Scope/index.html index a6974fee..40af4e37 100644 --- a/dev/opentelemetry/Opentelemetry/Scope/index.html +++ b/dev/opentelemetry/Opentelemetry/Scope/index.html @@ -1,2 +1,2 @@ -Scope (opentelemetry.Opentelemetry.Scope)

Module Opentelemetry.Scope

Scopes.

A scope is a trace ID and the span ID of the currently active span.

type t = {
  1. trace_id : Trace_id.t;
  2. span_id : Span_id.t;
  3. mutable events : Event.t list;
  4. mutable attrs : key_value list;
}
val add_event : t -> (unit -> Event.t) -> unit

Add an event to the scope. It will be aggregated into the span.

Note that this takes a function that produces an event, and will only call it if there is an instrumentation backend.

val add_attrs : t -> (unit -> key_value list) -> unit

Add an attr to the scope. It will be aggregated into the span.

Note that this takes a function that produces attributes, and will only call it if there is an instrumentation backend.

val get_surrounding : ?scope:t -> unit -> t option

Obtain current scope from thread-local storage, if available

\ No newline at end of file +Scope (opentelemetry.Opentelemetry.Scope)

Module Opentelemetry.Scope

Scopes.

A scope is a trace ID and the span ID of the currently active span.

type t = {
  1. trace_id : Trace_id.t;
  2. span_id : Span_id.t;
  3. mutable events : Event.t list;
  4. mutable attrs : key_value list;
}
val add_event : t -> (unit -> Event.t) -> unit

Add an event to the scope. It will be aggregated into the span.

Note that this takes a function that produces an event, and will only call it if there is an instrumentation backend.

val add_attrs : t -> (unit -> key_value list) -> unit

Add an attr to the scope. It will be aggregated into the span.

Note that this takes a function that produces attributes, and will only call it if there is an instrumentation backend.

val get_surrounding : ?scope:t -> unit -> t option

Obtain current scope from thread-local storage, if available

val with_scope : t -> (unit -> 'a) -> 'a

with_scope sc f calls f() in a context where sc is the (thread)-local scope, then reverts to the previous local scope, if any.

\ No newline at end of file diff --git a/dev/opentelemetry/Opentelemetry/Thread_local/index.html b/dev/opentelemetry/Opentelemetry/Thread_local/index.html index e49f3a7b..344b5a0d 100644 --- a/dev/opentelemetry/Opentelemetry/Thread_local/index.html +++ b/dev/opentelemetry/Opentelemetry/Thread_local/index.html @@ -1,2 +1,2 @@ -Thread_local (opentelemetry.Opentelemetry.Thread_local)

Module Opentelemetry.Thread_local

Thread/Domain local storage

This allows the creation of global state that is per-domain or per-thread.

type 'a t
val create : unit -> 'a t

Create new storage

val get : 'a t -> 'a option

Get current value

val get_exn : 'a t -> 'a

Like get but fails with an exception

  • raises Not_found

    if no value was found

val with_ : 'a t -> 'a -> ('a option -> 'b) -> 'b

with_ var x f sets var to x for this thread, calls f prev where prev is the value currently in var (if any), and then restores the old value of var for this thread.

\ No newline at end of file +Thread_local (opentelemetry.Opentelemetry.Thread_local)

Module Opentelemetry.Thread_local

Thread/Domain local storage

This allows the creation of global state that is per-domain or per-thread.

type 'a t
val create : unit -> 'a t

Create new storage

val get : 'a t -> 'a option

Get current value

val get_exn : 'a t -> 'a

Like get but fails with an exception

  • raises Not_found

    if no value was found

val set : 'a t -> 'a -> unit
val remove : _ t -> unit
val get_or_create : create:(unit -> 'a) -> 'a t -> 'a
val with_ : 'a t -> 'a -> ('a option -> 'b) -> 'b

with_ var x f sets var to x for this thread, calls f prev where prev is the value currently in var (if any), and then restores the old value of var for this thread.

\ No newline at end of file