Rheostat v0.1.1 Rheostat.Adapter behaviour 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.
Examples
iex> MyApp.Statix.decrement("open_connections", 1, [])
:ok
Same as gauge(key, value, [])
Writes to the StatsD gauge identified by key.
Examples
iex> MyApp.Statix.gauge("cpu_usage", 0.83, [])
:ok
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.
Examples
iex> MyApp.Statix.histogram("online_users", 123, [])
:ok
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.
Examples
iex> MyApp.Statix.increment("hits", 1, [])
:ok
Same as set(key, value, [])
Writes the given value to the StatsD set identified by key.
Examples
iex> MyApp.Statix.set("unique_visitors", "user1", [])
:ok
Same as timing(key, value, [])
Writes the given value to the StatsD timing identified by key.
value is expected in milliseconds.
Examples
iex> MyApp.Statix.timing("rendering", 12, [])
:ok
Link to this section Types
Link to this section 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.
Examples
iex> MyApp.Statix.decrement("open_connections", 1, [])
:ok
gauge(key(), value :: String.Chars.t()) :: on_send()
Same as gauge(key, value, []).
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
histogram(key(), value :: String.Chars.t()) :: on_send()
Same as histogram(key, value, []).
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
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.
Examples
iex> MyApp.Statix.increment("hits", 1, [])
:ok
set(key(), value :: String.Chars.t()) :: on_send()
Same as set(key, value, []).
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
timing(key(), value :: String.Chars.t()) :: on_send()
Same as timing(key, value, []).
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