diff --git a/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/index.html b/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/index.html index 9c0ded07..0811bf77 100644 --- a/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/index.html +++ b/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/index.html @@ -8,7 +8,7 @@ ?config:Config.t -> ?enable:bool -> unit -> - unit

Setup endpoint. This modifies Opentelemetry.Collector.backend.

val with_setup : + unit

Setup endpoint. This modifies Opentelemetry.Collector.backend.

val remove_backend : unit -> unit
val with_setup : ?stop:bool Atomic.t -> ?config:Config.t -> ?enable:bool -> diff --git a/opentelemetry-cohttp-lwt/Opentelemetry_cohttp_lwt/Server/index.html b/opentelemetry-cohttp-lwt/Opentelemetry_cohttp_lwt/Server/index.html index 5ca4f1cf..c99df386 100644 --- a/opentelemetry-cohttp-lwt/Opentelemetry_cohttp_lwt/Server/index.html +++ b/opentelemetry-cohttp-lwt/Opentelemetry_cohttp_lwt/Server/index.html @@ -9,15 +9,14 @@ 'conn -> Cohttp_lwt.Request.t -> 'body -> - (Cohttp_lwt.Response.t * 'body) Lwt.t

Trace requests to a Cohttp server.

Use it like this:

let my_server callback =
-  let callback_traced =
-    Opentelemetry_cohttp_lwt.Server.trace
-      ~service_name:"my-service"
-      (fun _scope -> callback)
-  in
-  Cohttp_lwt_unix.Server.create
-    ~mode:(`TCP (`Port 8080))
-    (Server.make () ~callback:callback_traced)
val with_ : + (Cohttp_lwt.Response.t * 'body) Lwt.t

Trace requests to a Cohttp server.

Use it like this:

  let my_server callback =
+    let callback_traced =
+      Opentelemetry_cohttp_lwt.Server.trace ~service_name:"my-service"
+        (fun _scope -> callback)
+    in
+    Cohttp_lwt_unix.Server.create
+      ~mode:(`TCP (`Port 8080))
+      (Server.make () ~callback:callback_traced)
val with_ : ?trace_state:string -> ?service_name:string -> ?attrs:Otel.Span.key_value list -> diff --git a/opentelemetry/Opentelemetry/Collector/Debug_backend/argument-1-B/index.html b/opentelemetry/Opentelemetry/Collector/Debug_backend/argument-1-B/index.html index 95d483b8..db70d69c 100644 --- a/opentelemetry/Opentelemetry/Collector/Debug_backend/argument-1-B/index.html +++ b/opentelemetry/Opentelemetry/Collector/Debug_backend/argument-1-B/index.html @@ -1,2 +1,2 @@ -B (opentelemetry.Opentelemetry.Collector.Debug_backend.B)

Parameter Debug_backend.B

val signal_emit_gc_metrics : unit -> unit

Signal the backend that it should emit GC metrics when it has the chance. This should be installed in a GC alarm or another form of regular trigger.

val tick : unit -> unit

Should be called regularly for background processing, timeout checks, etc.

val set_on_tick_callbacks : (unit -> unit) AList.t -> unit

Give the collector the list of callbacks to be executed when tick() is called. Each such callback should be short and reentrant. Depending on the collector's implementation, it might be called from a thread that is not the one that called on_tick.

val cleanup : unit -> unit
+B (opentelemetry.Opentelemetry.Collector.Debug_backend.B)

Parameter Debug_backend.B

val signal_emit_gc_metrics : unit -> unit

Signal the backend that it should emit GC metrics when it has the chance. This should be installed in a GC alarm or another form of regular trigger.

val tick : unit -> unit

Should be called regularly for background processing, timeout checks, etc.

val set_on_tick_callbacks : (unit -> unit) AList.t -> unit

Give the collector the list of callbacks to be executed when tick() is called. Each such callback should be short and reentrant. Depending on the collector's implementation, it might be called from a thread that is not the one that called on_tick.

val cleanup : on_done:(unit -> unit) -> unit -> unit

cleanup ~on_done () is called when the collector is shut down, and is responsible for sending remaining batches, flushing sockets, etc.

  • parameter on_done

    callback invoked after the cleanup is done. since NEXT_RELEASE

diff --git a/opentelemetry/Opentelemetry/Collector/Debug_backend/index.html b/opentelemetry/Opentelemetry/Collector/Debug_backend/index.html index b9cbd328..22ce661d 100644 --- a/opentelemetry/Opentelemetry/Collector/Debug_backend/index.html +++ b/opentelemetry/Opentelemetry/Collector/Debug_backend/index.html @@ -1,2 +1,2 @@ -Debug_backend (opentelemetry.Opentelemetry.Collector.Debug_backend)

Module Collector.Debug_backend

Parameters

module B : BACKEND

Signature

val signal_emit_gc_metrics : unit -> unit

Signal the backend that it should emit GC metrics when it has the chance. This should be installed in a GC alarm or another form of regular trigger.

val tick : unit -> unit

Should be called regularly for background processing, timeout checks, etc.

val set_on_tick_callbacks : (unit -> unit) AList.t -> unit

Give the collector the list of callbacks to be executed when tick() is called. Each such callback should be short and reentrant. Depending on the collector's implementation, it might be called from a thread that is not the one that called on_tick.

val cleanup : unit -> unit
+Debug_backend (opentelemetry.Opentelemetry.Collector.Debug_backend)

Module Collector.Debug_backend

Parameters

module B : BACKEND

Signature

val signal_emit_gc_metrics : unit -> unit

Signal the backend that it should emit GC metrics when it has the chance. This should be installed in a GC alarm or another form of regular trigger.

val tick : unit -> unit

Should be called regularly for background processing, timeout checks, etc.

val set_on_tick_callbacks : (unit -> unit) AList.t -> unit

Give the collector the list of callbacks to be executed when tick() is called. Each such callback should be short and reentrant. Depending on the collector's implementation, it might be called from a thread that is not the one that called on_tick.

val cleanup : on_done:(unit -> unit) -> unit -> unit

cleanup ~on_done () is called when the collector is shut down, and is responsible for sending remaining batches, flushing sockets, etc.

  • parameter on_done

    callback invoked after the cleanup is done. since NEXT_RELEASE

diff --git a/opentelemetry/Opentelemetry/Collector/Noop_backend/index.html b/opentelemetry/Opentelemetry/Collector/Noop_backend/index.html index c9d3894e..4c0c97e2 100644 --- a/opentelemetry/Opentelemetry/Collector/Noop_backend/index.html +++ b/opentelemetry/Opentelemetry/Collector/Noop_backend/index.html @@ -1,2 +1,2 @@ -Noop_backend (opentelemetry.Opentelemetry.Collector.Noop_backend)

Module Collector.Noop_backend

val signal_emit_gc_metrics : unit -> unit

Signal the backend that it should emit GC metrics when it has the chance. This should be installed in a GC alarm or another form of regular trigger.

val tick : unit -> unit

Should be called regularly for background processing, timeout checks, etc.

val set_on_tick_callbacks : (unit -> unit) AList.t -> unit

Give the collector the list of callbacks to be executed when tick() is called. Each such callback should be short and reentrant. Depending on the collector's implementation, it might be called from a thread that is not the one that called on_tick.

val cleanup : unit -> unit
+Noop_backend (opentelemetry.Opentelemetry.Collector.Noop_backend)

Module Collector.Noop_backend

val signal_emit_gc_metrics : unit -> unit

Signal the backend that it should emit GC metrics when it has the chance. This should be installed in a GC alarm or another form of regular trigger.

val tick : unit -> unit

Should be called regularly for background processing, timeout checks, etc.

val set_on_tick_callbacks : (unit -> unit) AList.t -> unit

Give the collector the list of callbacks to be executed when tick() is called. Each such callback should be short and reentrant. Depending on the collector's implementation, it might be called from a thread that is not the one that called on_tick.

val cleanup : on_done:(unit -> unit) -> unit -> unit

cleanup ~on_done () is called when the collector is shut down, and is responsible for sending remaining batches, flushing sockets, etc.

  • parameter on_done

    callback invoked after the cleanup is done. since NEXT_RELEASE

diff --git a/opentelemetry/Opentelemetry/Collector/index.html b/opentelemetry/Opentelemetry/Collector/index.html index 3411474f..6fbaaa75 100644 --- a/opentelemetry/Opentelemetry/Collector/index.html +++ b/opentelemetry/Opentelemetry/Collector/index.html @@ -1,5 +1,5 @@ -Collector (opentelemetry.Opentelemetry.Collector)

Module Opentelemetry.Collector

Collector types

These types are used by backend implementations, to send events to collectors such as Jaeger.

Note: most users will not need to touch this module

type 'msg sender = {
  1. send : 'a. 'msg -> ret:(unit -> 'a) -> 'a;
}

Sender interface for a message of type msg. Inspired from Logs' reporter (see its doc) but without over as it doesn't make much sense in presence of batching.

The ret callback is used to return the desired type (unit, or a Lwt promise, or anything else) once the event has been transferred to the backend. It doesn't mean the event has been collected yet, it could sit in a batch queue for a little while.

module type BACKEND = sig ... end

Collector client interface.

type backend = (module BACKEND)
val debug_backend : backend
val set_backend : backend -> unit

Set collector backend

val remove_backend : unit -> unit

Remove current backend, if any.

  • since 0.11
val has_backend : unit -> bool

Is there a configured backend?

val get_backend : unit -> backend option

Current backend, if any

val send_trace : +Collector (opentelemetry.Opentelemetry.Collector)

Module Opentelemetry.Collector

Collector types

These types are used by backend implementations, to send events to collectors such as Jaeger.

Note: most users will not need to touch this module

type 'msg sender = {
  1. send : 'a. 'msg -> ret:(unit -> 'a) -> 'a;
}

Sender interface for a message of type msg. Inspired from Logs' reporter (see its doc) but without over as it doesn't make much sense in presence of batching.

The ret callback is used to return the desired type (unit, or a Lwt promise, or anything else) once the event has been transferred to the backend. It doesn't mean the event has been collected yet, it could sit in a batch queue for a little while.

module type BACKEND = sig ... end

Collector client interface.

type backend = (module BACKEND)
val debug_backend : backend
val set_backend : backend -> unit

Set collector backend

val remove_backend : on_done:(unit -> unit) -> unit -> unit

Remove current backend, if any.

  • since 0.11
val has_backend : unit -> bool

Is there a configured backend?

val get_backend : unit -> backend option

Current backend, if any

val send_trace : Opentelemetry_proto.Trace.resource_spans list -> ret:(unit -> 'a) -> 'a
val send_metrics : @@ -9,6 +9,7 @@ Opentelemetry_proto.Logs.resource_logs list -> ret:(unit -> 'a) -> 'a
val rand_bytes_16 : unit -> bytes
val rand_bytes_8 : unit -> bytes
val on_tick : (unit -> unit) -> unit
val tick : unit -> unit

Do background work. Call this regularly if the collector doesn't already have a ticker thread or internal timer.

val with_setup_debug_backend : + ?on_done:(unit -> unit) -> backend -> ?enable:bool -> unit -> diff --git a/opentelemetry/Opentelemetry/Collector/module-type-BACKEND/index.html b/opentelemetry/Opentelemetry/Collector/module-type-BACKEND/index.html index 3423d71c..7ac55f91 100644 --- a/opentelemetry/Opentelemetry/Collector/module-type-BACKEND/index.html +++ b/opentelemetry/Opentelemetry/Collector/module-type-BACKEND/index.html @@ -1,2 +1,2 @@ -BACKEND (opentelemetry.Opentelemetry.Collector.BACKEND)

Module type Collector.BACKEND

Collector client interface.

val signal_emit_gc_metrics : unit -> unit

Signal the backend that it should emit GC metrics when it has the chance. This should be installed in a GC alarm or another form of regular trigger.

val tick : unit -> unit

Should be called regularly for background processing, timeout checks, etc.

val set_on_tick_callbacks : (unit -> unit) AList.t -> unit

Give the collector the list of callbacks to be executed when tick() is called. Each such callback should be short and reentrant. Depending on the collector's implementation, it might be called from a thread that is not the one that called on_tick.

val cleanup : unit -> unit
+BACKEND (opentelemetry.Opentelemetry.Collector.BACKEND)

Module type Collector.BACKEND

Collector client interface.

val signal_emit_gc_metrics : unit -> unit

Signal the backend that it should emit GC metrics when it has the chance. This should be installed in a GC alarm or another form of regular trigger.

val tick : unit -> unit

Should be called regularly for background processing, timeout checks, etc.

val set_on_tick_callbacks : (unit -> unit) AList.t -> unit

Give the collector the list of callbacks to be executed when tick() is called. Each such callback should be short and reentrant. Depending on the collector's implementation, it might be called from a thread that is not the one that called on_tick.

val cleanup : on_done:(unit -> unit) -> unit -> unit

cleanup ~on_done () is called when the collector is shut down, and is responsible for sending remaining batches, flushing sockets, etc.

  • parameter on_done

    callback invoked after the cleanup is done. since NEXT_RELEASE

diff --git a/opentelemetry/Opentelemetry/Trace_context/Traceparent/index.html b/opentelemetry/Opentelemetry/Trace_context/Traceparent/index.html index 1a7377af..68bed7f5 100644 --- a/opentelemetry/Opentelemetry/Trace_context/Traceparent/index.html +++ b/opentelemetry/Opentelemetry/Trace_context/Traceparent/index.html @@ -1,5 +1,5 @@ -Traceparent (opentelemetry.Opentelemetry.Trace_context.Traceparent)

Module Trace_context.Traceparent

The traceparent header https://www.w3.org/TR/trace-context/#traceparent-header

val name : string
val of_value : string -> (Trace_id.t * Span_id.t, string) result

Parse the value of the traceparent header.

The values are of the form:

{version}-{trace_id}-{parent_id}-{flags}

For example:

 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01 

{flags} are currently ignored.

val to_value : +Traceparent (opentelemetry.Opentelemetry.Trace_context.Traceparent)

Module Trace_context.Traceparent

The traceparent header https://www.w3.org/TR/trace-context/#traceparent-header

val name : string
val of_value : string -> (Trace_id.t * Span_id.t, string) result

Parse the value of the traceparent header.

The values are of the form:

  { version } - { trace_id } - { parent_id } - { flags }

For example:

  00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

{flags} are currently ignored.

val to_value : ?sampled:bool -> trace_id:Trace_id.t -> parent_id:Span_id.t ->