Module prometheus_collector

A collector for a set of metrics.

This module defines the prometheus_collector behaviour.
Required callback functions: collect_mf/2, collect_metrics/2, deregister_cleanup/1.

Description

A collector for a set of metrics.

Normal users should use prometheus_gauge, prometheus_counter, prometheus_summary and prometheus_histogram.

Implementing :prometheus_collector behaviour is for advanced uses, such as proxying metrics from another monitoring system. It is it the responsibility of the implementer to ensure produced metrics are valid.

You will be working with Prometheus data model directly (see prometheus_model_helpers).

Data Types

collect_mf_callback()

collect_mf_callback() = fun((prometheus_model:'MetricFamily'()) -> any())

collector()

collector() = atom()

data()

data() = any()

Function Index

collect_mf/3
deregister/1Equivalent to deregister(Collector, default).
deregister/2
enabled_collectors/0
register/1Equivalent to register(Collector, default).
register/2

Function Details

collect_mf/3

collect_mf(Collector, Callback, Registry) -> list()

deregister/1

deregister(Collector) -> any()

Equivalent to deregister(Collector, default).

deregister/2

deregister(Collector, Registry) -> ok

enabled_collectors/0

enabled_collectors() -> [collector()]

register/1

register(Collector) -> any()

Equivalent to register(Collector, default).

register/2

register(Collector, Registry) -> ok


Generated by EDoc, Aug 29 2016, 23:53:53.