Rheostat.Adapter behaviour (Rheostat v0.2.1) View Source
Link to this section Summary
Callbacks
Opens the connection to the StatsD-compatible server.
The configuration is read from the configuration for the :statix application
(both globally and per connection).
Same as decrement(key, 1, []).
Same as decrement(key, value, []).
Decrements the StatsD counter identified by key by the given value.
Works same as increment/3 but subtracts value instead of adding it. For
this reason value should be zero or negative.
Same as gauge(key, value, []).
Writes to the StatsD gauge identified by key.
Same as histogram(key, value, []).
Writes value to the histogram identified by key.
Not all StatsD-compatible servers support histograms. An example of a such
server statsite.
Same as increment(key, 1, []).
Same as increment(key, value, []).
Increments the StatsD counter identified by key by the given value.
value is supposed to be zero or positive and decrement/3 should be
used for negative values.
Same as set(key, value, []).
Writes the given value to the StatsD set identified by key.
Same as timing(key, value, []).
Writes the given value to the StatsD timing identified by key.
value is expected in milliseconds.
Link to this section Types
Link to this section Callbacks
Specs
connect(list()) :: :ok
Opens the connection to the StatsD-compatible server.
The configuration is read from the configuration for the :statix application
(both globally and per connection).
Specs
Specs
Same as decrement(key, 1, []).
Specs
Same as decrement(key, value, []).
Specs
Decrements the StatsD counter identified by key by the given value.
Works same as increment/3 but subtracts value instead of adding it. For
this reason value should be zero or negative.
Examples
iex> MyApp.Statix.decrement("open_connections", 1, [])
:ok Specs
gauge(key(), value :: String.Chars.t()) :: on_send()
Same as gauge(key, value, []).
Specs
gauge(key(), value :: String.Chars.t(), options()) :: on_send()
Writes to the StatsD gauge identified by key.
Examples
iex> MyApp.Statix.gauge("cpu_usage", 0.83, [])
:ok Specs
histogram(key(), value :: String.Chars.t()) :: on_send()
Same as histogram(key, value, []).
Specs
histogram(key(), value :: String.Chars.t(), options()) :: on_send()
Writes value to the histogram identified by key.
Not all StatsD-compatible servers support histograms. An example of a such
server statsite.
Examples
iex> MyApp.Statix.histogram("online_users", 123, [])
:ok Specs
Same as increment(key, 1, []).
Specs
Same as increment(key, value, []).
Specs
Increments the StatsD counter identified by key by the given value.
value is supposed to be zero or positive and decrement/3 should be
used for negative values.
Examples
iex> MyApp.Statix.increment("hits", 1, [])
:ok Specs
Specs
Specs
set(key(), value :: String.Chars.t()) :: on_send()
Same as set(key, value, []).
Specs
set(key(), value :: String.Chars.t(), options()) :: on_send()
Writes the given value to the StatsD set identified by key.
Examples
iex> MyApp.Statix.set("unique_visitors", "user1", [])
:ok Specs
timing(key(), value :: String.Chars.t()) :: on_send()
Same as timing(key, value, []).
Specs
timing(key(), value :: String.Chars.t(), options()) :: on_send()
Writes the given value to the StatsD timing identified by key.
value is expected in milliseconds.
Examples
iex> MyApp.Statix.timing("rendering", 12, [])
:ok