metric() = counter | histogram | gauge | meter | spiral
metrics_engine() = #metrics_ng{}
| decrement_counter/2 | decrement a counter with 1. |
| decrement_counter/3 | decrement a counter with value. |
| decrement_spiral/2 | decrement a spiral with 1. |
| decrement_spiral/3 | decrement a spiral with value. |
| delete/2 | delete a metric. |
| get_value/2 | Fetch the current value of the metric. |
| increment_counter/2 | increment a counter with 1. |
| increment_counter/3 | increment a counter with Value. |
| increment_spiral/2 | increment a spiral with 1. |
| increment_spiral/3 | increment a spiral with Value. |
| init/1 | set the module to use for metrics. |
| new/3 | create a new metric. |
| sample/2 | Tells the metric to take a sample. |
| update_gauge/3 | update a gauge with a value. |
| update_histogram/3 | update an histogram with a value or the duration of a function. |
| update_meter/3 | update a meter with a valyue. |
decrement_counter(Metrics_ng::metrics_engine(), Name::any()) -> ok | {error, term()}
decrement a counter with 1
decrement_counter(Metrics_ng::metrics_engine(), Name::any(), Value::pos_integer()) -> ok | {error, term()}
decrement a counter with value
decrement_spiral(Metrics_ng::metrics_engine(), Name::any()) -> ok | {error, term()}
decrement a spiral with 1
decrement_spiral(Metrics_ng::metrics_engine(), Name::any(), Value::pos_integer()) -> ok | {error, term()}
decrement a spiral with value
delete(Metrics_ng::metrics_engine(), Name::any()) -> ok
delete a metric
get_value(Metrics_ng::metrics_engine(), Name::any()) -> term() | {error, term()}
Fetch the current value of the metric.
increment_counter(Metrics_ng::metrics_engine(), Name::any()) -> ok | {error, term()}
increment a counter with 1
increment_counter(Metrics_ng::metrics_engine(), Name::any(), Value::pos_integer()) -> ok | {error, term()}
increment a counter with Value
increment_spiral(Metrics_ng::metrics_engine(), Name::any()) -> ok | {error, term()}
increment a spiral with 1
increment_spiral(Metrics_ng::metrics_engine(), Name::any(), Value::pos_integer()) -> ok | {error, term()}
increment a spiral with Value
init(Mod::atom()) -> metrics_engine()
set the module to use for metrics. Types are: counter, histograme, gauge, meter
modules supported are:metrics_folsom: to interface folsommetrics_exometer: to interface to exometermetrics_dummy: a dummy module to use by default.new(Metrics_ng::metrics_engine(), Type::metric(), Name::any()) -> ok | {error, term()}
create a new metric
sample(Metrics_ng::metrics_engine(), Name::any()) -> ok | unsupported | list() | {error, term()}
Tells the metric to take a sample.
update_gauge(Metrics_ng::metrics_engine(), Name::any(), Value::number()) -> ok | {error, term()}
update a gauge with a value
update_histogram(Metrics_ng::metrics_engine(), Name::any(), ValueOrFun::number()) -> ok | {error, term()}
update_histogram(Metrics_ng::metrics_engine(), Name::any(), ValueOrFun::function()) -> ok | {error, term()}
update an histogram with a value or the duration of a function. When passing a function the result will be returned once the metric have been updated with the duration.
update_meter(Metrics_ng::metrics_engine(), Name::any(), Value::number()) -> ok | {error, term()}
update a meter with a valyue
Generated by EDoc