Method: Datadog::Statsd#timing
- Defined in:
- lib/datadog/statsd.rb
#timing(stat, ms, opts = EMPTY_OPTIONS) ⇒ Object
Sends a timing (in ms) for the given stat to the statsd server. The sample_rate determines what percentage of the time this report is sent. The statsd server then uses the sample_rate to correctly track the average timing for the stat.
308 309 310 311 |
# File 'lib/datadog/statsd.rb', line 308 def timing(stat, ms, opts = EMPTY_OPTIONS) opts = { sample_rate: opts } if opts.is_a?(Numeric) send_stats(stat, ms, TIMING_TYPE, opts) end |