diff --git a/opentelemetry-lwt/Opentelemetry_lwt/Trace/index.html b/opentelemetry-lwt/Opentelemetry_lwt/Trace/index.html index 04a03a15..072da2bf 100644 --- a/opentelemetry-lwt/Opentelemetry_lwt/Trace/index.html +++ b/opentelemetry-lwt/Opentelemetry_lwt/Trace/index.html @@ -21,7 +21,7 @@ | `String of string ]) list -> span list -> - unit

Sync emitter.

This instructs the collector to forward the spans to some backend at a later point.

NOTE be careful not to call this inside a Gc alarm, as it can cause deadlocks.

type scope = Opentelemetry.Scope.t = {
  1. trace_id : Opentelemetry.Trace_id.t;
  2. span_id : Opentelemetry.Span_id.t;
  3. mutable events : Opentelemetry.Event.t list;
  4. mutable attrs : Opentelemetry.Span.key_value list;
}
val add_event : + unit

Sync emitter.

This instructs the collector to forward the spans to some backend at a later point.

NOTE be careful not to call this inside a Gc alarm, as it can cause deadlocks.

type scope = Opentelemetry.Scope.t = {
  1. trace_id : Opentelemetry.Trace_id.t;
  2. span_id : Opentelemetry.Span_id.t;
  3. mutable events : Opentelemetry.Event.t list;
  4. mutable attrs : Opentelemetry.Span.key_value list;
}
val add_event : Opentelemetry.Scope.t -> (unit -> Opentelemetry.Event.t) -> unit
val add_attrs : @@ -38,7 +38,7 @@ ?scope:Opentelemetry.Scope.t -> ?links:Opentelemetry.Span_link.t list -> string -> - (scope -> 'a) -> + (Opentelemetry.Scope.t -> 'a) -> (unit -> 'a) * ((unit, exn * Stdlib.Printexc.raw_backtrace) result -> unit)

Sync span guard.

Notably, this includes implicit scope-tracking: if called without a ~scope argument (or ~parent/~trace_id), it will check in the Ambient_context for a surrounding environment, and use that as the scope. Similarly, it uses Scope.with_ambient_scope to set a new scope in the ambient context, so that any logically-nested calls to with_ will use this span as their parent.

NOTE be careful not to call this inside a Gc alarm, as it can cause deadlocks.

val with_ : ?force_new_trace_id:bool -> ?trace_state:string -> diff --git a/opentelemetry/Opentelemetry/Scope/index.html b/opentelemetry/Opentelemetry/Scope/index.html index 6d10a519..0fd63277 100644 --- a/opentelemetry/Opentelemetry/Scope/index.html +++ b/opentelemetry/Opentelemetry/Scope/index.html @@ -1,2 +1,9 @@ -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 to_span_ctx : t -> Span_ctx.t

Turn the scope into a span context

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 record_exception : t -> exn -> Stdlib.Printexc.raw_backtrace -> unit
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 ambient_scope_key : t {Ambient_context}2.key

The opaque key necessary to access/set the ambient scope with Ambient_context.

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

Obtain current scope from Ambient_context, if available.

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

with_ambient_scope sc thunk calls thunk() in a context where sc is the (thread|continuation)-local scope, then reverts to the previous local scope, if any.

+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 make : + trace_id:Trace_id.t -> + span_id:Span_id.t -> + ?events:Event.t list -> + ?attrs:key_value list -> + ?links:Span_link.t list -> + unit -> + t
val to_span_ctx : t -> Span_ctx.t

Turn the scope into a span context

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 record_exception : t -> exn -> Stdlib.Printexc.raw_backtrace -> unit
val add_attrs : t -> (unit -> key_value list) -> unit

Add attributes 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.

Add links to the scope. It will be aggregated into the span.

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

val ambient_scope_key : t {Ambient_context}2.key

The opaque key necessary to access/set the ambient scope with Ambient_context.

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

Obtain current scope from Ambient_context, if available.

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

with_ambient_scope sc thunk calls thunk() in a context where sc is the (thread|continuation)-local scope, then reverts to the previous local scope, if any.

diff --git a/opentelemetry/Opentelemetry/Trace/index.html b/opentelemetry/Opentelemetry/Trace/index.html index 19ea569e..8bd986e5 100644 --- a/opentelemetry/Opentelemetry/Trace/index.html +++ b/opentelemetry/Opentelemetry/Trace/index.html @@ -21,7 +21,7 @@ | `String of string ]
) list -> span list -> - unit

Sync emitter.

This instructs the collector to forward the spans to some backend at a later point.

NOTE be careful not to call this inside a Gc alarm, as it can cause deadlocks.

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

Sync emitter.

This instructs the collector to forward the spans to some backend at a later point.

NOTE be careful not to call this inside a Gc alarm, as it can cause deadlocks.

type scope = Scope.t = {
  1. trace_id : Trace_id.t;
  2. span_id : Span_id.t;
  3. mutable events : Event.t list;
  4. mutable attrs : Span.key_value list;
}
val add_event : Scope.t -> (unit -> Event.t) -> unit
val add_attrs : Scope.t -> (unit -> key_value list) -> unit
val with_' : ?force_new_trace_id:bool -> ?trace_state:string -> ?service_name:string -> @@ -32,7 +32,7 @@ ?scope:Scope.t -> ?links:Span_link.t list -> string -> - (scope -> 'a) -> + (Scope.t -> 'a) -> (unit -> 'a) * ((unit, exn * Stdlib.Printexc.raw_backtrace) result -> unit)

Sync span guard.

Notably, this includes implicit scope-tracking: if called without a ~scope argument (or ~parent/~trace_id), it will check in the Ambient_context for a surrounding environment, and use that as the scope. Similarly, it uses Scope.with_ambient_scope to set a new scope in the ambient context, so that any logically-nested calls to with_ will use this span as their parent.

NOTE be careful not to call this inside a Gc alarm, as it can cause deadlocks.

val with_ : ?force_new_trace_id:bool -> ?trace_state:string -> diff --git a/opentelemetry/Opentelemetry/index.html b/opentelemetry/Opentelemetry/index.html index 97fc9b4c..5fc9b021 100644 --- a/opentelemetry/Opentelemetry/index.html +++ b/opentelemetry/Opentelemetry/index.html @@ -1,2 +1,2 @@ -Opentelemetry (opentelemetry.Opentelemetry)

Module Opentelemetry

Opentelemetry types and instrumentation

module Lock : sig ... end

Global lock.

module Rand_bytes : sig ... end

Generation of random identifiers.

module AList : sig ... end

Atomic list, for internal usage

Wire format

module Proto = Opentelemetry_proto

Protobuf types.

Timestamps

module Timestamp_ns : sig ... end

Unix timestamp.

Interface to data collector

module Collector : sig ... end

Collector types

Identifiers

module Trace_id : sig ... end

Trace ID.

val k_trace_id : Trace_id.t Hmap.key

Hmap key to carry around a Trace_id.t, to remember what the current trace is.

  • since 0.8
module Span_id : sig ... end

Unique ID of a span.

module Span_ctx : sig ... end

Span context. This bundles up a trace ID and parent ID.

val k_span_ctx : Span_ctx.t Hmap.key

Hmap key to carry around a Span_ctx.t, e.g. to remember what the current parent span is.

  • since 0.8

Attributes and conventions

module Conventions : sig ... end

Semantic conventions

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

A value in a key/value attribute

type key_value = string * value

Global settings

module Globals : sig ... end

Process-wide metadata, environment variables, etc.

Traces and Spans

module Event : sig ... end

Events.

Scopes

module Scope : sig ... end

Scopes.

Traces

Span Link

module Span : sig ... end

Spans.

module Trace : sig ... end

Traces.

Metrics

module Metrics : sig ... end

Metrics.

module Metrics_callbacks : sig ... end

A set of callbacks that produce metrics when called. The metrics are automatically called regularly.

Logs

module Logs : sig ... end

Logs.

Utils

module Trace_context : sig ... end

Implementation of the W3C Trace Context spec

module GC_metrics : sig ... end

Export GC metrics.

+Opentelemetry (opentelemetry.Opentelemetry)

Module Opentelemetry

Opentelemetry types and instrumentation

module Lock : sig ... end

Global lock.

module Rand_bytes : sig ... end

Generation of random identifiers.

module AList : sig ... end

Atomic list, for internal usage

Wire format

module Proto = Opentelemetry_proto

Protobuf types.

Timestamps

module Timestamp_ns : sig ... end

Unix timestamp.

Interface to data collector

module Collector : sig ... end

Collector types

Identifiers

module Trace_id : sig ... end

Trace ID.

val k_trace_id : Trace_id.t Hmap.key

Hmap key to carry around a Trace_id.t, to remember what the current trace is.

  • since 0.8
module Span_id : sig ... end

Unique ID of a span.

module Span_ctx : sig ... end

Span context. This bundles up a trace ID and parent ID.

val k_span_ctx : Span_ctx.t Hmap.key

Hmap key to carry around a Span_ctx.t, e.g. to remember what the current parent span is.

  • since 0.8

Attributes and conventions

module Conventions : sig ... end

Semantic conventions

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

A value in a key/value attribute

type key_value = string * value

Global settings

module Globals : sig ... end

Process-wide metadata, environment variables, etc.

Traces and Spans

module Event : sig ... end

Events.

Span Link

Scopes

module Scope : sig ... end

Scopes.

Traces

module Span : sig ... end

Spans.

module Trace : sig ... end

Traces.

Metrics

module Metrics : sig ... end

Metrics.

module Metrics_callbacks : sig ... end

A set of callbacks that produce metrics when called. The metrics are automatically called regularly.

Logs

module Logs : sig ... end

Logs.

Utils

module Trace_context : sig ... end

Implementation of the W3C Trace Context spec

module GC_metrics : sig ... end

Export GC metrics.