Class: Rearview::Statsd
- Inherits:
-
Statsd
- Object
- Statsd
- Rearview::Statsd
- Defined in:
- lib/rearview/statsd.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Statsd
constructor
A new instance of Statsd.
Constructor Details
#initialize ⇒ Statsd
Returns a new instance of Statsd.
4 5 6 7 |
# File 'lib/rearview/statsd.rb', line 4 def initialize super(Rearview.config.statsd_connection[:host],Rearview.config.statsd_connection[:port]) self.namespace = Rearview.config.statsd_connection[:namespace] end |
Class Method Details
.report ⇒ Object
13 14 15 16 17 |
# File 'lib/rearview/statsd.rb', line 13 def self.report if block_given? && Rearview.config.stats_enabled? yield self.statsd end end |
.statsd ⇒ Object
9 10 11 |
# File 'lib/rearview/statsd.rb', line 9 def self.statsd @@statsd ||= Rearview::Statsd.new end |