module Statsd::Methods

Direct including types

Defined in:

statsd/methods.cr

Instance Method Summary

Instance Method Detail

def decrement(metric_name, sample_rate = nil, tags = nil) #

[View source]
def gauge(metric_name, value, tags = nil) #

Gauge

A gauge is an instantaneous measurement of a value, like the gas gauge in a car. It differs from a counter by being calculated at the client rather than the server. Valid gauge values are in the range [0, 2^64^)


[View source]
def histogram(metric_name, value, tags = nil) #

Histograms

A histogram is a measure of the distribution of timer values over time, calculated at the server. As the data exported for timers and histograms is the same, this is currently an alias for a timer. Valid histogram values are in the range [0, 2^64^).

Example:

<metric name>:<value>|h

[View source]
def increment(metric_name, sample_rate = nil, tags = nil) #

[View source]
def set(metric_name, value, tags = nil) #

Sets

StatsD supports counting unique occurences of events between flushes, using a Set to store all occuring events. Example:

<metric name>:<value>|s

[View source]
def time(metric_name, tags = nil, &) #

Measure execution time of a given block, using {#timing}.


[View source]
def timing(metric_name, ms, tags = nil) #

Send a timing as a metric. This is sending a time measurement, as calculated by some other code, in milliseconds.

Example:

stastd.timing("db.query", 200)

[View source]