Method: Datadog::Statsd#decrement
- Defined in:
- lib/datadog/statsd.rb
#decrement(stat, opts = EMPTY_OPTIONS) ⇒ Object
Sends a decrement (count = -1) for the given stat to the statsd server.
205 206 207 208 209 |
# File 'lib/datadog/statsd.rb', line 205 def decrement(stat, opts = EMPTY_OPTIONS) opts = { sample_rate: opts } if opts.is_a?(Numeric) decr_value = - opts.fetch(:by, 1) count(stat, decr_value, opts) end |