package opentelemetry

  1. Overview
  2. Docs
Instrumentation for https://opentelemetry.io

Install

dune-project
 Dependency

Authors

Maintainers

Sources

opentelemetry-0.13.tbz
sha256=e29a0aa7168357ebbed0f50b1ba9374bc277b280935531e77d90183c732b98f6
sha512=2fd9dcf03695be7b7888c5fb3d0dbe2acdcfbb7c99dfa7b2ff2fc0bb626c4e35ec8d2be71632e440b9df1cc79529c5258ca98876a373a41cff48e4b1757c5767

doc/opentelemetry.client/Opentelemetry_client/Config/Env/index.html

Module Config.EnvSource

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

Sourceval get_debug : unit -> bool
Sourceval set_debug : bool -> unit
Sourceval get_headers : unit -> (string * string) list
Sourceval set_headers : (string * string) list -> unit
Sourceval 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)