diff --git a/opentelemetry/Opentelemetry/Scope/index.html b/opentelemetry/Opentelemetry/Scope/index.html index 04a7209e..031eb04a 100644 --- a/opentelemetry/Opentelemetry/Scope/index.html +++ b/opentelemetry/Opentelemetry/Scope/index.html @@ -1,9 +1,10 @@ -Scope (opentelemetry.Opentelemetry.Scope)

Module Opentelemetry.Scope

Scopes.

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

type item_list
type t = {
  1. trace_id : Trace_id.t;
  2. span_id : Span_id.t;
  3. mutable items : item_list;
}
val attrs : t -> key_value list
val events : t -> Event.t list
val make : +Scope (opentelemetry.Opentelemetry.Scope)

Module Opentelemetry.Scope

Scopes.

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

type item_list
type t = {
  1. trace_id : Trace_id.t;
  2. span_id : Span_id.t;
  3. mutable items : item_list;
}
val attrs : t -> key_value list
val events : t -> Event.t list
val status : t -> Span_status.t option
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 -> + ?status:Span_status.t -> unit -> - t
val to_span_ctx : t -> Span_ctx.t
val add_event : t -> (unit -> Event.t) -> unit
val record_exception : t -> exn -> Stdlib.Printexc.raw_backtrace -> unit
val add_attrs : t -> (unit -> key_value list) -> unit
val ambient_scope_key : t {Ambient_context}3.key
val get_ambient_scope : ?scope:t -> unit -> t option
val with_ambient_scope : t -> (unit -> 'a) -> 'a
+ 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 set_status : t -> Span_status.t -> unit

set the span status.

Note that this function will be called only if there is an instrumentation backend.

val ambient_scope_key : t {Ambient_context}3.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/Span/index.html b/opentelemetry/Opentelemetry/Span/index.html index b97ebdbd..2ec86476 100644 --- a/opentelemetry/Opentelemetry/Span/index.html +++ b/opentelemetry/Opentelemetry/Span/index.html @@ -1,5 +1,5 @@ -Span (opentelemetry.Opentelemetry.Span)

Module Opentelemetry.Span

Spans.

A Span is the workhorse of traces, it indicates an operation that took place over a given span of time (indicated by start_time and end_time) as part of a hierarchical trace. All spans in a given trace are bound by the use of the same Trace_id.t.

type id = Span_id.t
type nonrec kind = Proto.Trace.span_span_kind =
  1. | Span_kind_unspecified
  2. | Span_kind_internal
  3. | Span_kind_server
  4. | Span_kind_client
  5. | Span_kind_producer
  6. | Span_kind_consumer
type nonrec status_code = Proto.Trace.status_status_code =
  1. | Status_code_unset
  2. | Status_code_ok
  3. | Status_code_error
type nonrec status = Proto.Trace.status = {
  1. message : string;
  2. code : status_code;
}
val id : t -> Span_id.t
type key_value = +Span (opentelemetry.Opentelemetry.Span)

Module Opentelemetry.Span

Spans.

A Span is the workhorse of traces, it indicates an operation that took place over a given span of time (indicated by start_time and end_time) as part of a hierarchical trace. All spans in a given trace are bound by the use of the same Trace_id.t.

type id = Span_id.t
type nonrec kind = Proto.Trace.span_span_kind =
  1. | Span_kind_unspecified
  2. | Span_kind_internal
  3. | Span_kind_server
  4. | Span_kind_client
  5. | Span_kind_producer
  6. | Span_kind_consumer
val id : t -> Span_id.t
type key_value = string * [ `Int of int | `String of string @@ -11,7 +11,7 @@ ?trace_state:string -> ?attrs:key_value list -> ?events:Event.t list -> - ?status:status -> + ?status:Proto.Trace.status -> trace_id:Trace_id.t -> ?parent:id -> ?links:Span_link.t list -> diff --git a/opentelemetry/Opentelemetry/Span_status/index.html b/opentelemetry/Opentelemetry/Span_status/index.html new file mode 100644 index 00000000..e10ce0e3 --- /dev/null +++ b/opentelemetry/Opentelemetry/Span_status/index.html @@ -0,0 +1,2 @@ + +Span_status (opentelemetry.Opentelemetry.Span_status)

Module Opentelemetry.Span_status

val make : message:string -> code:code -> t
diff --git a/opentelemetry/Opentelemetry/index.html b/opentelemetry/Opentelemetry/index.html index 5fc9b021..ee3280cc 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.

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.

+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

module Span_status : sig ... end

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.