ExStatsD

Settings are taken from the ex_statsd application configuration.

The following are used to connect to your statsd server:

You can also provide an optional namespace to automatically nest all stats.

Source

Summary

count(collection, metric, options \\ [sample_rate: 1, tags: []])

Record the Enum.count/1 of an enumerable

counter(amount, metric, options \\ [sample_rate: 1, tags: []])

Record a counter metric

decrement(metric, options \\ [sample_rate: 1, tags: []])

Record a decrement to a counter metric

gauge(amount, metric, options \\ [tags: []])

Record a gauge entry

histogram(amount, metric, options \\ [sample_rate: 1, tags: []])

Record a histogram value (DogStatsD-only)

histogram_timing(metric, fun, options \\ [sample_rate: 1, tags: []])

Time a function using a histogram metric (DogStatsD-only)

increment(metric, options \\ [sample_rate: 1, tags: []])

Record an increment to a counter metric

set(member, metric, options \\ [tags: []])

Record a set metric

start_link(options \\ [])

Start the server

stop()

Stop the server

timer(amount, metric, options \\ [sample_rate: 1, tags: []])

Record a timer metric

timing(metric, fun, options \\ [sample_rate: 1, tags: []])

Measure a function call

Functions

count(collection, metric, options \\ [sample_rate: 1, tags: []])

Record the Enum.count/1 of an enumerable.

  • sample_rate: Limit how often the metric is collected
  • tags: Add tags to entry (DogStatsD-only)

It returns the collection given as its first argument, making it suitable for pipelining.

Source
counter(amount, metric, options \\ [sample_rate: 1, tags: []])

Record a counter metric.

  • sample_rate: Limit how often the metric is collected
  • tags: Add tags to entry (DogStatsD-only)

It returns the amount given as its first argument, making it suitable for pipelining.

Source
decrement(metric, options \\ [sample_rate: 1, tags: []])

Record a decrement to a counter metric.

  • sample_rate: Limit how often the metric is collected
  • tags: Add tags to entry (DogStatsD-only)

Returns nil.

Source
gauge(amount, metric, options \\ [tags: []])

Record a gauge entry.

  • tags: Add tags to entry (DogStatsD-only)

It returns the amount given as its first argument, making it suitable for pipelining.

Source
histogram(amount, metric, options \\ [sample_rate: 1, tags: []])

Record a histogram value (DogStatsD-only).

  • sample_rate: Limit how often the metric is collected
  • tags: Add tags to entry (DogStatsD-only)

It returns the value given as the first argument, making it suitable for pipelining.

Source
histogram_timing(metric, fun, options \\ [sample_rate: 1, tags: []])

Time a function using a histogram metric (DogStatsD-only).

  • sample_rate: Limit how often the metric is collected
  • tags: Add tags to entry (DogStatsD-only)

It returns the result of the function call, making it suitable for pipelining.

Source
increment(metric, options \\ [sample_rate: 1, tags: []])

Record an increment to a counter metric.

  • sample_rate: Limit how often the metric is collected
  • tags: Add tags to entry (DogStatsD-only)

Returns nil.

Source
set(member, metric, options \\ [tags: []])

Record a set metric.

  • tags: Add tags to entry (DogStatsD-only)

It returns the value given as its first argument, making it suitable for pipelining.

Source
start_link(options \\ [])

Start the server.

Source
stop()

Stop the server.

Source
timer(amount, metric, options \\ [sample_rate: 1, tags: []])

Record a timer metric.

  • sample_rate: Limit how often the metric is collected
  • tags: Add tags to entry (DogStatsD-only)

It returns the value given as its first argument, making it suitable for pipelining.

Source
timing(metric, fun, options \\ [sample_rate: 1, tags: []])

Measure a function call.

  • sample_rate: Limit how often the metric is collected
  • tags: Add tags to entry (DogStatsD-only)

It returns the result of the function call, making it suitable for pipelining.

Source