Module: NdrStats::Stats
- Included in:
- NdrStats
- Defined in:
- lib/ndr_stats/stats.rb
Overview
The supported types of measurement. Currently just mirrors what the statsd format supports, with the addition of tagging through DataDog’s extension to the serialisation format.
Instance Method Summary collapse
- #count(name, by = 1, **tags) ⇒ Object
- #gauge(name, value, **tags) ⇒ Object
- #time(name, **tags, &block) ⇒ Object
- #timing(name, value, **tags) ⇒ Object
Instance Method Details
#count(name, by = 1, **tags) ⇒ Object
18 19 20 21 22 |
# File 'lib/ndr_stats/stats.rb', line 18 def count(name, by = 1, **) return unless configured? adaptor.count(name, by, tags: ) end |
#gauge(name, value, **tags) ⇒ Object
24 25 26 27 28 |
# File 'lib/ndr_stats/stats.rb', line 24 def gauge(name, value, **) return unless configured? adaptor.gauge(name, value, tags: ) end |
#time(name, **tags, &block) ⇒ Object
12 13 14 15 16 |
# File 'lib/ndr_stats/stats.rb', line 12 def time(name, **, &block) return yield unless configured? adaptor.time(name, tags: , &block) end |
#timing(name, value, **tags) ⇒ Object
6 7 8 9 10 |
# File 'lib/ndr_stats/stats.rb', line 6 def timing(name, value, **) return unless configured? adaptor.timing(name, value, tags: ) end |