Method: Datadog::Statsd#histogram

Defined in:
lib/datadog/statsd.rb

#histogram(stat, value, opts = {}) ⇒ Object

Sends a value to be tracked as a histogram to the statsd server.

Examples:

Report the current user count:

$statsd.histogram('user.count', User.count)

Parameters:

  • stat (String)

    stat name.

  • value (Numeric)

    histogram value.

  • opts (Hash) (defaults to: {})

    the options to create the metric with

Options Hash (opts):

  • :sample_rate (Numeric)

    sample rate, 1 for always

  • :tags (Array<String>)

    An array of tags



173
174
175
# File 'lib/datadog/statsd.rb', line 173

def histogram(stat, value, opts={})
  send_stats stat, value, :h, opts
end