package opentelemetry

  1. Overview
  2. Docs
Core library for instrumentation and serialization for https://opentelemetry.io

Install

dune-project
 Dependency

Authors

Maintainers

Sources

opentelemetry-0.91.tbz
sha256=4aaee2025957acf71434a027bd57ee699a9ae927e6b49804fb1e999e16a03694
sha512=f3ec030fc4ca0483c3fc143eaa802e2aa02b4c25e1a03ec967bd017fad8a4ef6287e9f9688486434d1ac2fc403217658b61d2c7f3709c092c939b93f412ee5c5

doc/opentelemetry.core/Opentelemetry_core/Instrument/index.html

Module Opentelemetry_core.InstrumentSource

Global registry of metric instruments.

Instruments are stateful accumulators (counters, gauges, histograms, …). update is called at any time to record a value; emit is called at collection time by a Meter.t, which supplies the clock.

All instruments register themselves into a global list on creation via register, so any meter can collect the full set in one pass. Make sure to only create instruments at the toplevel so that the list doesn't grow forever.

Sourcetype 'a t = {
  1. kind : string;
    (*

    "counter", "gauge", "histogram", …

    *)
  2. name : string;
  3. emit : clock:Clock.t -> unit -> Metrics.t list;
    (*

    Snapshot current accumulated state into metrics.

    *)
  4. update : 'a -> unit;
    (*

    Record a new value.

    *)
}
Sourceval register : 'a t -> unit

Add an instrument's emit to all. Called automatically by the standard instrument-creation functions.

Sourcemodule type CUSTOM_IMPL = sig ... end

Implementation details for a custom stateful instrument. Pass to Make to obtain a create function.

Sourcemodule Make (I : CUSTOM_IMPL) : sig ... end

Build a custom instrument type from a CUSTOM_IMPL. The returned create registers the instrument into all automatically.

Sourcemodule Int_counter : sig ... end
Sourcemodule Float_counter : sig ... end
Sourcemodule Int_gauge : sig ... end
Sourcemodule Float_gauge : sig ... end
Sourcemodule Histogram : sig ... end
Sourcemodule Internal : sig ... end