Module Prometheus.MetricInfo

Metadata about a metric.

type t = {
  1. name : MetricName.t;
  2. metric_type : metric_type;
  3. help : string;
  4. label_names : LabelName.t list;
}
val v : help:string -> ?label_names:LabelName.t list -> metric_type:metric_type -> ?namespace:string -> ?subsystem:string -> string -> t

v ~help ~label_names ~metric_type ~namespace ~subsystem name creates metric metadata with full name namespace_subsystem_name and documentation string help.

  • parameter help

    Documentation string describing the metric.

  • parameter label_names

    Names of labels for this metric (default: []).

  • parameter metric_type

    The type of metric (Counter, Gauge, Summary, or Histogram).

  • parameter namespace

    Optional prefix for the metric name.

  • parameter subsystem

    Optional prefix between namespace and name.