Class: DataDogMetricsBackend

Inherits:
MetricsBackend show all
Defined in:
lib/mm_metrics/backends/dd.rb

Instance Method Summary collapse

Methods inherited from MetricsBackend

connect, gauge, histogram, increment, timed

Constructor Details

#initialize(host = 'localhost', port = 8125, logger = Logging.logger(STDOUT)) ⇒ DataDogMetricsBackend

Returns a new instance of DataDogMetricsBackend.



6
7
8
9
10
# File 'lib/mm_metrics/backends/dd.rb', line 6

def initialize(host = 'localhost', port = 8125, logger = Logging.logger(STDOUT))
    @host = host
    @port = port
    @logger = logger
end

Instance Method Details

#gauge(metric, value, tags = []) ⇒ Object



16
17
18
# File 'lib/mm_metrics/backends/dd.rb', line 16

def gauge(metric, value, tags = [])
    @logger.debug "gauge #{metric} to #{value}"
end

#histogram(metric, value, tags = []) ⇒ Object



20
21
22
# File 'lib/mm_metrics/backends/dd.rb', line 20

def histogram(metric, value, tags = [])
    @logger.debug "histogram #{metric} to #{value}"
end

#increment(metric, tags = []) ⇒ Object



12
13
14
# File 'lib/mm_metrics/backends/dd.rb', line 12

def increment(metric, tags = [])
    @logger.debug "increment #{metric}"
end

#timed(metric, duration, tags = []) ⇒ Object



24
25
26
# File 'lib/mm_metrics/backends/dd.rb', line 24

def timed(metric, duration, tags = [])
    @logger.debug "time #{metric} as #{value}"
end