Behaviours: application
, gen_server
.
metric() = counter | histogram | gauge | meter | spiral | duration
metric_name() = list()
probe() = {c, integer()} | timer_start | timer_end | {duration_fun, function()} | value()
value() = any()
backend/0 | retrieve the current backend name. |
backend/1 | set the backend to use. |
code_change/3 | |
delete/1 | delete a metric. |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
new/2 | initialise a metric. |
start/2 | |
start_link/0 | |
stop/1 | |
terminate/2 | |
update/1 | increment a counter with 1. |
update/2 | update a metric. |
update_or_create/3 | update a metric and create it if it doesn't exists. |
backend() -> atom()
retrieve the current backend name
backend(Mod::atom()) -> ok
set the backend to use
code_change(OldVsn, State, Extra) -> any()
delete(Name) -> Result
Name = metric_name()
Result = ok | any()
delete a metric
handle_call(X1, From, State) -> any()
handle_cast(Msg, State) -> any()
handle_info(Info, State) -> any()
init(X1) -> any()
new(Metric, Name) -> Result
Metric = metric()
Name = metric_name()
Result = ok
initialise a metric
start(StartType::application:start_type(), StartArgs::any()) -> {ok, pid()}
start_link() -> {ok, pid()}
stop(State::atom()) -> ok
terminate(Reason, State) -> any()
update(Name) -> Result
Name = metric_name()
Result = ok | any()
increment a counter with 1
update(Name, Probe) -> Result
Name = metric_name()
Probe = probe()
Result = ok | any()
update a metric
update_or_create(Name, Probe, Metric) -> Result
Name = metric_name()
Probe = probe()
Metric = metric()
Result = ok | any()
update a metric and create it if it doesn't exists