Class: StatsWhisper::Backend::StatsD

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/stats_whisper/backend/statsd.rb

Instance Method Summary collapse

Constructor Details

#initializeStatsD

Returns a new instance of StatsD.



11
12
13
# File 'lib/stats_whisper/backend/statsd.rb', line 11

def initialize
  @statsd = Statsd.new(hostname, port)
end

Instance Method Details

#hostnameObject



15
16
17
# File 'lib/stats_whisper/backend/statsd.rb', line 15

def hostname
  ENV['STATSWHISPER_HOST'] || 'localhost'
end

#portObject



19
20
21
# File 'lib/stats_whisper/backend/statsd.rb', line 19

def port
  ENV['STATSWHISPER_PORT'] || 8125
end