Method: Datadog::Statsd#gauge
- Defined in:
- lib/datadog/statsd.rb
#gauge(stat, value, opts = EMPTY_OPTIONS) ⇒ Object
Sends an arbitrary gauge value for the given stat to the statsd server.
This is useful for recording things like available disk space, memory usage, and the like, which have different semantics than counters.
240 241 242 243 |
# File 'lib/datadog/statsd.rb', line 240 def gauge(stat, value, opts = EMPTY_OPTIONS) opts = { sample_rate: opts } if opts.is_a?(Numeric) send_stats(stat, value, GAUGE_TYPE, opts) end |