extatus v0.2.2 Extatus.Metric.Histogram

This module defines a wrapper over Prometheus.Metric.Histogram functions to be compatible with Extatus way of handling metrics.

Summary

Functions

Creates a histogram using the name of a metric. If the counter exists, returns false

Observes the given amount for the histogram identified by name and values (keyword list with the correspondence between labels and values). If amount happened to be a float number even one time(!) you shoudn’t use observe/3 after dobserve/3

Creates a histogram using the name of a metric

Observes the given amount for the histogram identified by name and values (keyword list with the correspondence between labels and values)

Observes the histogram identified by name and values (keyword list with the correspondence between labels and values) to the amount of time spent executing function

Removes histogram series identified by name and values (keyword list with the correspondence between labels and values)

Resets the value of the histogram identified by name and values (keyword list with the correspondence between labels and values)

Returns the value of the histogram identified by name and values (keyword list with the correspondence between labels and values)

Functions

declare(name) (macro)

Creates a histogram using the name of a metric. If the counter exists, returns false.

dobserve(name, values, amount \\ 1) (macro)

Observes the given amount for the histogram identified by name and values (keyword list with the correspondence between labels and values). If amount happened to be a float number even one time(!) you shoudn’t use observe/3 after dobserve/3.

new(name) (macro)

Creates a histogram using the name of a metric.

observe(name, values, amount \\ 1) (macro)

Observes the given amount for the histogram identified by name and values (keyword list with the correspondence between labels and values).

observe_duration(name, values, function) (macro)

Observes the histogram identified by name and values (keyword list with the correspondence between labels and values) to the amount of time spent executing function.

remove(name, values) (macro)

Removes histogram series identified by name and values (keyword list with the correspondence between labels and values).

reset(name, values) (macro)

Resets the value of the histogram identified by name and values (keyword list with the correspondence between labels and values).

value(name, values) (macro)

Returns the value of the histogram identified by name and values (keyword list with the correspondence between labels and values).