Class: Rearview::Statsd

Inherits:
Statsd
  • Object
show all
Defined in:
lib/rearview/statsd.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStatsd

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

.reportObject



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

.statsdObject



9
10
11
# File 'lib/rearview/statsd.rb', line 9

def self.statsd
  @@statsd ||= Rearview::Statsd.new
end