diff --git a/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/Env/index.html b/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/Env/index.html new file mode 100644 index 00000000..8abca2f9 --- /dev/null +++ b/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/Env/index.html @@ -0,0 +1,13 @@ + +Env (opentelemetry-client-ocurl.Opentelemetry_client_ocurl.Config.Env)

Module Config.Env

val get_debug : unit -> bool
val set_debug : bool -> unit
val get_headers : unit -> (string * string) list
val set_headers : (string * string) list -> unit

make f is a make function that will give f a safely constructed t.

Typically this is used to extend the constructor for t with new optional arguments.

E.g., we can construct a configuration that includes a t alongside a more specific field like so:

  type extended_config = {
+    new_field: string;
+    common: t;
+  }
+
+  let make : (new_field:string -> unit -> extended_config) make =
+    Env.make (fun common ~new_field () -> { new_field; common })
+
+  let _example : extended_config =
+    make ~new_field:"foo" ~url_traces:"foo/bar" ~debug:true ()

As a special case, we can get the simple constructor function for t with Env.make (fun common () -> common)

diff --git a/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/index.html b/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/index.html index 192d6419..ca417d0c 100644 --- a/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/index.html +++ b/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/index.html @@ -1,15 +1,8 @@ -Config (opentelemetry-client-ocurl.Opentelemetry_client_ocurl.Config)

Module Opentelemetry_client_ocurl.Config

Configuration for the ocurl backend

type t = private {
  1. debug : bool;
  2. url_traces : string;
    (*

    Url to send traces

    *)
  3. url_metrics : string;
    (*

    Url to send metrics

    *)
  4. url_logs : string;
    (*

    Url to send logs

    *)
  5. headers : (string * string) list;
    (*

    API headers sent to the endpoint. Default is none or "OTEL_EXPORTER_OTLP_HEADERS" if set.

    *)
  6. batch_timeout_ms : int;
    (*

    Number of milliseconds after which we will emit a batch, even incomplete. Note that the batch might take longer than that, because this is only checked when a new event occurs or when a tick is emitted. Default 2_000.

    *)
  7. bg_threads : int;
    (*

    Are there background threads, and how many? Default 4. This will be adjusted to be at least 1 and at most 32.

    *)
  8. ticker_thread : bool;
    (*

    If true, start a thread that regularly checks if signals should be sent to the collector. Default true

    *)
  9. ticker_interval_ms : int;
    (*

    Interval for ticker thread, in milliseconds. This is only useful if ticker_thread is true. This will be clamped between 2 ms and some longer interval (maximum 60s currently). Default 500.

    • since 0.7
    *)
  10. self_trace : bool;
    (*

    If true, the OTEL library will also emit its own spans. Default false.

    • since 0.7
    *)
}

Configuration.

To build one, use make below. This might be extended with more fields in the future.

val make : - ?debug:bool -> - ?url:string -> - ?url_traces:string -> - ?url_metrics:string -> - ?url_logs:string -> - ?headers:(string * string) list -> - ?batch_timeout_ms:int -> - ?bg_threads:int -> - ?ticker_thread:bool -> - ?ticker_interval_ms:int -> - ?self_trace:bool -> - unit -> - t

Make a configuration.

  • parameter url

    base url used to construct per-signal urls. Per-signal url options take precedence over this base url. Default is "http://localhost:4318", or "OTEL_EXPORTER_OTLP_ENDPOINT" if set.

Example of constructed per-signal urls with the base url http://localhost:4318

  • Traces: http://localhost:4318/v1/traces
  • Metrics: http://localhost:4318/v1/metrics
  • Logs: http://localhost:4318/v1/logs

Use per-signal url options if different urls are needed for each signal type.

  • parameter url_traces

    url to send traces, or "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT" if set. The url is used as-is without any modification.

  • parameter url_metrics

    url to send metrics, or "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT" if set. The url is used as-is without any modification.

  • parameter url_logs

    url to send logs, or "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT" if set. The url is used as-is without any modification.

val pp : Stdlib.Format.formatter -> t -> unit
+Config (opentelemetry-client-ocurl.Opentelemetry_client_ocurl.Config)

Module Opentelemetry_client_ocurl.Config

Configuration for the ocurl backend

type t = {
  1. bg_threads : int;
    (*

    Are there background threads, and how many? Default 4. This will be adjusted to be at least 1 and at most 32.

    *)
  2. ticker_thread : bool;
    (*

    If true, start a thread that regularly checks if signals should be sent to the collector. Default true

    *)
  3. ticker_interval_ms : int;
    (*

    Interval for ticker thread, in milliseconds. This is only useful if ticker_thread is true. This will be clamped between 2 ms and some longer interval (maximum 60s currently). Default 500.

    • since 0.7
    *)
  4. common : Opentelemetry_client.Config.t;
    (*

    Common configuration options

    • since NEXT_RELEASE
    *)
}

Configuration.

To build one, use make below. This might be extended with more fields in the future.

val pp : Stdlib.Format.formatter -> t -> unit
val make : + (?bg_threads:int -> + ?ticker_thread:bool -> + ?ticker_interval_ms:int -> + unit -> + t) + Opentelemetry_client.Config.make

Make a configuration t.

diff --git a/opentelemetry/Opentelemetry_client/Client/index.html b/opentelemetry/Opentelemetry_client/Client/index.html new file mode 100644 index 00000000..fb292620 --- /dev/null +++ b/opentelemetry/Opentelemetry_client/Client/index.html @@ -0,0 +1,2 @@ + +Client (opentelemetry.Opentelemetry_client.Client)

Module Opentelemetry_client.Client

Utilities for writing clients

These are used for implementing e.g., the opentelemetry-client-cohttp-lwt and opentelemetry-client-ocurl packages package.

module Config = Config
diff --git a/opentelemetry/Opentelemetry_client/Config/Env/index.html b/opentelemetry/Opentelemetry_client/Config/Env/index.html new file mode 100644 index 00000000..81c83628 --- /dev/null +++ b/opentelemetry/Opentelemetry_client/Config/Env/index.html @@ -0,0 +1,11 @@ + +Env (opentelemetry.Opentelemetry_client.Config.Env)

Module Config.Env

A generative functor that produces a state-space that can read configuration values from the environment, provide stateful configuration setting and accessing operations, and a way to make a new t configuration record

Parameters

Signature

val get_debug : unit -> bool
val set_debug : bool -> unit
val get_headers : unit -> (string * string) list
val set_headers : (string * string) list -> unit
val make : (t -> 'a) -> 'a make

make f is a make function that will give f a safely constructed t.

Typically this is used to extend the constructor for t with new optional arguments.

E.g., we can construct a configuration that includes a t alongside a more specific field like so:

  type extended_config = {
+    new_field: string;
+    common: t;
+  }
+
+  let make : (new_field:string -> unit -> extended_config) make =
+    Env.make (fun common ~new_field () -> { new_field; common })
+
+  let _example : extended_config =
+    make ~new_field:"foo" ~url_traces:"foo/bar" ~debug:true ()

As a special case, we can get the simple constructor function for t with Env.make (fun common () -> common)

diff --git a/opentelemetry/Opentelemetry_client/Config/index.html b/opentelemetry/Opentelemetry_client/Config/index.html new file mode 100644 index 00000000..0173a7b9 --- /dev/null +++ b/opentelemetry/Opentelemetry_client/Config/index.html @@ -0,0 +1,14 @@ + +Config (opentelemetry.Opentelemetry_client.Config)

Module Opentelemetry_client.Config

Constructing and managing the configuration needed in common by all clients

type t = private {
  1. debug : bool;
  2. url_traces : string;
    (*

    Url to send traces

    *)
  3. url_metrics : string;
    (*

    Url to send metrics

    *)
  4. url_logs : string;
    (*

    Url to send logs

    *)
  5. headers : (string * string) list;
    (*

    API headers sent to the endpoint. Default is none or "OTEL_EXPORTER_OTLP_HEADERS" if set.

    *)
  6. batch_traces : int option;
    (*

    Batch traces? If Some i, then this produces batches of (at most) i items. If None, there is no batching.

    Note that traces and metrics are batched separately. Default Some 400.

    *)
  7. batch_metrics : int option;
    (*

    Batch metrics? If Some i, then this produces batches of (at most) i items. If None, there is no batching.

    Note that traces and metrics are batched separately. Default None.

    *)
  8. batch_logs : int option;
    (*

    Batch logs? See batch_metrics for details. Default Some 400

    *)
  9. batch_timeout_ms : int;
    (*

    Number of milliseconds after which we will emit a batch, even incomplete. Note that the batch might take longer than that, because this is only checked when a new event occurs or when a tick is emitted. Default 2_000.

    *)
  10. self_trace : bool;
    (*

    If true, the OTEL library will also emit its own spans. Default false.

    • since 0.7
    *)
}

Configuration.

To build one, use make below. This might be extended with more fields in the future.

val pp : Stdlib.Format.formatter -> t -> unit
type 'k make = + ?debug:bool -> + ?url:string -> + ?url_traces:string -> + ?url_metrics:string -> + ?url_logs:string -> + ?batch_traces:int option -> + ?batch_metrics:int option -> + ?batch_logs:int option -> + ?headers:(string * string) list -> + ?batch_timeout_ms:int -> + ?self_trace:bool -> + 'k

A function that gathers all the values needed to construct a t, and produces a 'k. 'k is typically a continuation used to construct a configuration that includes a t.

  • parameter url

    base url used to construct per-signal urls. Per-signal url options take precedence over this base url. Default is "http://localhost:4318", or "OTEL_EXPORTER_OTLP_ENDPOINT" if set.

Example of constructed per-signal urls with the base url http://localhost:4318

  • Traces: http://localhost:4318/v1/traces
  • Metrics: http://localhost:4318/v1/metrics
  • Logs: http://localhost:4318/v1/logs

Use per-signal url options if different urls are needed for each signal type.

  • parameter url_traces

    url to send traces, or "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT" if set. The url is used as-is without any modification.

  • parameter url_metrics

    url to send metrics, or "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT" if set. The url is used as-is without any modification.

  • parameter url_logs

    url to send logs, or "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT" if set. The url is used as-is without any modification.

module type ENV = sig ... end

Construct, inspect, and update t configurations, drawing defaults from the environment and encapsulating state

module Env () : ENV

A generative functor that produces a state-space that can read configuration values from the environment, provide stateful configuration setting and accessing operations, and a way to make a new t configuration record

diff --git a/opentelemetry/Opentelemetry_client/Config/module-type-ENV/index.html b/opentelemetry/Opentelemetry_client/Config/module-type-ENV/index.html new file mode 100644 index 00000000..5a0e9c61 --- /dev/null +++ b/opentelemetry/Opentelemetry_client/Config/module-type-ENV/index.html @@ -0,0 +1,11 @@ + +ENV (opentelemetry.Opentelemetry_client.Config.ENV)

Module type Config.ENV

Construct, inspect, and update t configurations, drawing defaults from the environment and encapsulating state

val get_debug : unit -> bool
val set_debug : bool -> unit
val get_headers : unit -> (string * string) list
val set_headers : (string * string) list -> unit
val make : (t -> 'a) -> 'a make

make f is a make function that will give f a safely constructed t.

Typically this is used to extend the constructor for t with new optional arguments.

E.g., we can construct a configuration that includes a t alongside a more specific field like so:

  type extended_config = {
+    new_field: string;
+    common: t;
+  }
+
+  let make : (new_field:string -> unit -> extended_config) make =
+    Env.make (fun common ~new_field () -> { new_field; common })
+
+  let _example : extended_config =
+    make ~new_field:"foo" ~url_traces:"foo/bar" ~debug:true ()

As a special case, we can get the simple constructor function for t with Env.make (fun common () -> common)

diff --git a/opentelemetry/Opentelemetry_client/index.html b/opentelemetry/Opentelemetry_client/index.html new file mode 100644 index 00000000..f884650b --- /dev/null +++ b/opentelemetry/Opentelemetry_client/index.html @@ -0,0 +1,2 @@ + +Opentelemetry_client (opentelemetry.Opentelemetry_client)

Module Opentelemetry_client

module Client : sig ... end

Utilities for writing clients

module Config : sig ... end

Constructing and managing the configuration needed in common by all clients

diff --git a/opentelemetry/Opentelemetry_client__Client/index.html b/opentelemetry/Opentelemetry_client__Client/index.html new file mode 100644 index 00000000..9b5c06d0 --- /dev/null +++ b/opentelemetry/Opentelemetry_client__Client/index.html @@ -0,0 +1,2 @@ + +Opentelemetry_client__Client (opentelemetry.Opentelemetry_client__Client)

Module Opentelemetry_client__Client

This module is hidden.

diff --git a/opentelemetry/Opentelemetry_client__Config/index.html b/opentelemetry/Opentelemetry_client__Config/index.html new file mode 100644 index 00000000..0a7a6da1 --- /dev/null +++ b/opentelemetry/Opentelemetry_client__Config/index.html @@ -0,0 +1,2 @@ + +Opentelemetry_client__Config (opentelemetry.Opentelemetry_client__Config)

Module Opentelemetry_client__Config

This module is hidden.

diff --git a/opentelemetry/index.html b/opentelemetry/index.html index 785bffa7..ce4c87ea 100644 --- a/opentelemetry/index.html +++ b/opentelemetry/index.html @@ -1,2 +1,2 @@ -index (opentelemetry.index)

Package opentelemetry

Package info

changes-files
readme-files
+index (opentelemetry.index)

Package opentelemetry

Package info

changes-files
readme-files