Module Prometheus_lwt.CollectorRegistry

type t
val of_registry : Prometheus.CollectorRegistry.t -> t

of_registry core is the Lwt view over the existing registry core.

val default : t

default is the view over Prometheus.CollectorRegistry.default.

core t is the underlying core registry. Use it to register synchronous metrics.

collect t reads the current value of every metric.

val register : t -> Prometheus.MetricInfo.t -> (unit -> Prometheus.Sample_set.t Prometheus.LabelSetMap.t Lwt.t) -> unit

register t info collector registers a collector that may suspend before producing its samples.

val register_pre_collect : t -> (unit -> unit Lwt.t) -> unit

register_pre_collect t f arranges for f () to run at the start of each collection.