From 70df750cc1d97e8c25339c000c4f87eba1a04811 Mon Sep 17 00:00:00 2001 From: c-cube Date: Fri, 27 Sep 2024 14:19:20 +0000 Subject: [PATCH] deploy: 9680d61a36e1a5eddd93d9afa8e2e6ee9d8f8bcd --- opentelemetry-lwt/Opentelemetry_lwt/Trace/index.html | 5 +---- opentelemetry-lwt/Opentelemetry_lwt/index.html | 2 +- opentelemetry/Opentelemetry/Scope/index.html | 2 +- opentelemetry/Opentelemetry/Trace/index.html | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/opentelemetry-lwt/Opentelemetry_lwt/Trace/index.html b/opentelemetry-lwt/Opentelemetry_lwt/Trace/index.html index 4fba26b0..04a03a15 100644 --- a/opentelemetry-lwt/Opentelemetry_lwt/Trace/index.html +++ b/opentelemetry-lwt/Opentelemetry_lwt/Trace/index.html @@ -39,10 +39,7 @@ ?links:Opentelemetry.Span_link.t list -> string -> (scope -> 'a) -> - (unit -> - 'a) - * ((unit, string * 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_ : + (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 -> ?service_name:string -> diff --git a/opentelemetry-lwt/Opentelemetry_lwt/index.html b/opentelemetry-lwt/Opentelemetry_lwt/index.html index f0775e98..990fb62d 100644 --- a/opentelemetry-lwt/Opentelemetry_lwt/index.html +++ b/opentelemetry-lwt/Opentelemetry_lwt/index.html @@ -1,2 +1,2 @@ -Opentelemetry_lwt (opentelemetry-lwt.Opentelemetry_lwt)

Module Opentelemetry_lwt

module Span_id = Opentelemetry.Span_id
module Trace_id = Opentelemetry.Trace_id
module Event = Opentelemetry.Event
module Span = Opentelemetry.Span
module Globals = Opentelemetry.Globals
module Timestamp_ns = Opentelemetry.Timestamp_ns
module GC_metrics = Opentelemetry.GC_metrics
module Metrics_callbacks = Opentelemetry.Metrics_callbacks
module Trace_context = Opentelemetry.Trace_context
module Trace : sig ... end
module Metrics : sig ... end
module Logs : sig ... end
+Opentelemetry_lwt (opentelemetry-lwt.Opentelemetry_lwt)

Module Opentelemetry_lwt

module Span_id = Opentelemetry.Span_id
module Trace_id = Opentelemetry.Trace_id
module Event = Opentelemetry.Event
module Span = Opentelemetry.Span
module Globals = Opentelemetry.Globals
module Timestamp_ns = Opentelemetry.Timestamp_ns
module GC_metrics = Opentelemetry.GC_metrics
module Metrics_callbacks = Opentelemetry.Metrics_callbacks
module Trace_context = Opentelemetry.Trace_context
val reraise : exn -> 'a

This is equivalent to Lwt.reraise. We inline it here so we don't force to use Lwt's latest version

module Trace : sig ... end
module Metrics : sig ... end
module Logs : sig ... end
diff --git a/opentelemetry/Opentelemetry/Scope/index.html b/opentelemetry/Opentelemetry/Scope/index.html index b9468a2d..6d10a519 100644 --- a/opentelemetry/Opentelemetry/Scope/index.html +++ b/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 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 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 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.

diff --git a/opentelemetry/Opentelemetry/Trace/index.html b/opentelemetry/Opentelemetry/Trace/index.html index 5894cbc2..19ea569e 100644 --- a/opentelemetry/Opentelemetry/Trace/index.html +++ b/opentelemetry/Opentelemetry/Trace/index.html @@ -33,10 +33,7 @@ ?links:Span_link.t list -> string -> (scope -> 'a) -> - (unit -> - 'a) - * ((unit, string * 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_ : + (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 -> ?service_name:string ->