Prometheus.ex v3.0.5 API Reference

Modules

Prometheus.io client library powered by prometheus.erl

Histogram buckets generators

A collector for a set of metrics

Configuration templates for custom collectors/exporters

HTTP instrumentation helpers

Mnesia instrumentation helpers

Serializes Prometheus registry using protocol buffer format

Serializes Prometheus registry using the latest text format

Prometheus metrics shortcuts

Boolean metric, to report booleans and flags

Counter is a Metric that represents a single numerical value that only ever goes up. That implies that it cannot be used to count items whose number can also go down, e.g. the number of currently running processes. Those "counters" are represented by Prometheus.Metric.Gauge

Gauge metric, to report instantaneous values

A Histogram tracks the size and number of events in buckets. You can use Histograms for aggregatable calculation of quantiles

Summary metric, to track the size of events

Helpers for working with Prometheus data model. For advanced users

A registry of Collectors

Exceptions

Raised when mandatory configuration option not found in app env

Raised when fn passed as block has more then 0 arguments

Raised by histogram constructors when bucket bound isn't a number

Raised by histogram constructors when buckets are invalid i.e. not sorted in increasing order or generator spec is unknown

Raised when label name is invalid i.e. can't be represented as printable utf-8 string that matches ^[a-zA-Z_][a-zA-Z0-9_]*$ regular expression or starts with __

Raised when metric arity is invalid e.g. counter metric was created with two labels but only one label value is passed to Prometheus.Metric.Counter.inc/2

Raised when given metric help is invalid i.e. isn't a printable utf-8 string

Raised when labels isn't a list

Raised when given metric name is invalid i.e. can't be represented as printable utf-8 string that matches ^[a-zA-Z_:][a-zA-Z0-9_:]*$ regular expression

Raised when given value is invalid i.e. when you pass a negative number to Prometheus.Metric.Counter.inc/2

Raised when one tries to create metric in registry with name it already exists

Raised when required metric spec key is missing. All metrics require at least name and when metric created help

Raised by histogram constructors when buckets can't be found in spec, or found value is empty list