package opentelemetry

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

opentelemetry-0.12.tbz
sha256=ca92e7395495f73b46316607c514ce0dbe5fab129dddd9a17b353f835dcbf77d
sha512=ea2afd07c8db955364681f90388959db97d7b7f5b0836bc4045eca929968d6d77905e3aa66802226c0791c2552d0e281bdf2dbfe7ed90e9877ce3cedc343823f

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)