Module Prometheus

Collect metrics for Prometheus. See: https://prometheus.io/

Notes:

type metric_type =
| Counter
| Gauge
| Summary
| Histogram
module type NAME = sig ... end

A string that meets some additional requirements.

module MetricName : NAME

A valid name for a metric.

module LabelName : NAME

A valid name for a label.

module MetricInfo : sig ... end

Metadata about a metric.

module LabelSetMap : Asetmap.Map.S with type key = string list

A map indexed by a set of labels.

module MetricFamilyMap : Asetmap.Map.S with type key = MetricInfo.t

A map indexed by metric families.

module Sample_set : sig ... end
module CollectorRegistry : sig ... end

A collection of metric reporters. Usually, only CollectorRegistry.default is used.

module type METRIC = sig ... end

Operations common to all types of metric.

module Counter : sig ... end

A counter is a cumulative metric that represents a single numerical value that only ever goes up.

module Gauge : sig ... end

A gauge is a metric that represents a single numerical value that can arbitrarily go up and down.

module Summary : sig ... end

A summary is a metric that records both the number of readings and their total. This allows calculating the average.

module Histogram_spec : sig ... end
module type HISTOGRAM = sig ... end
module Histogram (Buckets : sig ... end) : HISTOGRAM

A histogram configured with reasonable defaults for measuring network request times in seconds.