module Racecar::Datadog
Constants
- STATSD_NAMESPACE
Public Class Methods
configure() { |self| ... }
click to toggle source
# File lib/racecar/datadog.rb, line 17 def configure yield self end
host()
click to toggle source
# File lib/racecar/datadog.rb, line 30 def host @host end
host=(host)
click to toggle source
# File lib/racecar/datadog.rb, line 34 def host=(host) @host = host clear end
namespace()
click to toggle source
# File lib/racecar/datadog.rb, line 48 def namespace @namespace ||= STATSD_NAMESPACE end
namespace=(namespace)
click to toggle source
# File lib/racecar/datadog.rb, line 52 def namespace=(namespace) @namespace = namespace clear end
port()
click to toggle source
# File lib/racecar/datadog.rb, line 39 def port @port end
port=(port)
click to toggle source
# File lib/racecar/datadog.rb, line 43 def port=(port) @port = port clear end
statsd()
click to toggle source
# File lib/racecar/datadog.rb, line 21 def statsd @statsd ||= ::Datadog::Statsd.new(host, port, namespace: namespace, tags: tags) end
statsd=(statsd)
click to toggle source
# File lib/racecar/datadog.rb, line 25 def statsd=(statsd) clear @statsd = statsd end
Private Class Methods
clear()
click to toggle source
# File lib/racecar/datadog.rb, line 68 def clear @statsd && @statsd.close @statsd = nil end