lib/datadog/statsd.rb
# Sends an increment (count = 1) for the given stat to the statsd server.
#
# @param [String] stat stat name
# @param [Hash] opts the options to create the metric with
# @option opts [Numeric] :sample_rate sample rate, 1 for always
# @option opts [Array<String>] :tags An array of tags
# @option opts [Numeric] :by increment value, default 1
# @see #count
Sends an increment (count = 1) for the given stat to the statsd server.
Sends an increment ( count = 1 ) for the given stat to the statsd server .
def increment(stat, opts = EMPTY_OPTIONS)
      opts = { sample_rate: opts } if opts.is_a?(Numeric)
      incr_value = opts.fetch(:by, 1)
      count(stat, incr_value, opts)
    end
def increment ( stat , opts = EMPTY_OPTIONS ) opts = { sample_rate : opts } if opts . is_a? ( Numeric ) incr_value = opts . fetch ( :by , 1 ) count ( stat , incr_value , opts ) end
Sends an increment (count = 1) for the given stat to the statsd server.
Sends an increment ( count = 1 ) for the given stat to the statsd server .
stat
opts
:by increment value, default 1
: by increment value default 1
opts the options to create the metric with
opts the options to create the metric with
see
None