Class: HostedGraphite::STATSD

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

Constant Summary collapse

HOST =
'statsd.hostedgraphite.com'.freeze
PORT =
8125.freeze

Instance Method Summary collapse

Constructor Details

#initializeSTATSD

Returns a new instance of STATSD.

Raises:



12
13
14
15
16
17
18
19
20
# File 'lib/hosted_graphite/protocols/statsd.rb', line 12

def initialize
  raise MissingAPIKey unless HostedGraphite.api_key
  super(HOST, PORT)
  if HostedGraphite.namespace
    self.namespace = [HostedGraphite.api_key,HostedGraphite.namespace].join('.')
  else
    self.namespace = HostedGraphite.api_key
  end
end