Method: Datadog::Statsd#increment

Defined in:
lib/datadog/statsd.rb

#increment(stat, opts = {}) ⇒ Object

Sends an increment (count = 1) for the given stat to the statsd server.

Parameters:

  • stat (String)

    stat name

  • 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

  • :by (Numeric)

    increment value, default 1

See Also:



118
119
120
121
# File 'lib/datadog/statsd.rb', line 118

def increment(stat, opts={})
  incr_value = opts.fetch(:by, 1)
  count stat, incr_value, opts
end