metrics_statsd v1.0.1 Metrics

Wrapper module for the Erlang metrics app.

Summary

Functions

Initialize the Metrics module and set the reporting module to use; defaults to MetricsStatsD. This function must be called before using any of the other functions of this module

Set the reporting module to use. Unlike init, this function can also be used to change the module after initialization

Functions

decrement(name)

Wrapper for :metrics.decrement/2.

decrement(name, value)

Wrapper for :metrics.decrement/3.

increment(name)

Wrapper for :metrics.increment/2.

increment(name, value)

Wrapper for :metrics.increment/3.

init(mod_metrics \\ MetricsStatsD)

Initialize the Metrics module and set the reporting module to use; defaults to MetricsStatsD. This function must be called before using any of the other functions of this module.

If init was called before, the reporting module will NOT be re-set or updated.

Returns :ok.

Examples

iex> Metrics.init(:metrics_folsom)
:ok
set_reporter_module(mod_metrics)

Set the reporting module to use. Unlike init, this function can also be used to change the module after initialization.

timer(name, fun_or_value)

Wrapper for :metrics.update_histogram/3.