Module: Stats
- Defined in:
- lib/mas/stats.rb
Class Method Summary collapse
Class Method Details
.client ⇒ Object
10 11 12 13 14 |
# File 'lib/mas/stats.rb', line 10 def self.client $statsd ||= Statsd.new('statsd.hostedgraphite.com', 8125).tap do |n| n.namespace = key end end |
.gauge(*args) ⇒ Object
6 7 8 |
# File 'lib/mas/stats.rb', line 6 def self.gauge(*args) client.gauge(*args) if key end |
.increment(*args) ⇒ Object
2 3 4 |
# File 'lib/mas/stats.rb', line 2 def self.increment(*args) client.increment(*args) if key end |
.key ⇒ Object
16 17 18 |
# File 'lib/mas/stats.rb', line 16 def self.key ENV['HOSTEDGRAPHITE_APIKEY'] end |