extatus v0.2.3 Extatus.Metric.Counter

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

Summary

Functions

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

Increments the counter identified by name and values (keyword list with the correspondence between labels and values) by value. If value happened to be a float even one time(!) you shouldn’t use inc/3 after dinc/3

Increments the counter identified by name and values (keyword list with the correspondence between labels and values) by value

Creates a counter using the name of a metric

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

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

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

Functions

declare(name) (macro)

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

dinc(name, values, value \\ 1) (macro)

Increments the counter identified by name and values (keyword list with the correspondence between labels and values) by value. If value happened to be a float even one time(!) you shouldn’t use inc/3 after dinc/3.

inc(name, values, value \\ 1) (macro)

Increments the counter identified by name and values (keyword list with the correspondence between labels and values) by value.

new(name) (macro)

Creates a counter using the name of a metric.

remove(name, values) (macro)

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

reset(name, values) (macro)

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

value(name, values) (macro)

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