Module: Racecar::Datadog
- Defined in:
- lib/racecar/datadog.rb
Defined Under Namespace
Classes: ConsumerSubscriber, ProducerSubscriber, StatsdSubscriber
Constant Summary
collapse
- STATSD_NAMESPACE =
"racecar"
Class Method Summary
collapse
Class Method Details
.close ⇒ Object
66
67
68
|
# File 'lib/racecar/datadog.rb', line 66
def close
@statsd&.close
end
|
17
18
19
|
# File 'lib/racecar/datadog.rb', line 17
def configure
yield self
end
|
.host ⇒ Object
30
31
32
|
# File 'lib/racecar/datadog.rb', line 30
def host
@host
end
|
.host=(host) ⇒ Object
34
35
36
37
|
# File 'lib/racecar/datadog.rb', line 34
def host=(host)
@host = host
clear
end
|
.namespace ⇒ Object
48
49
50
|
# File 'lib/racecar/datadog.rb', line 48
def namespace
@namespace ||= STATSD_NAMESPACE
end
|
.namespace=(namespace) ⇒ Object
52
53
54
55
|
# File 'lib/racecar/datadog.rb', line 52
def namespace=(namespace)
@namespace = namespace
clear
end
|
.port ⇒ Object
39
40
41
|
# File 'lib/racecar/datadog.rb', line 39
def port
@port
end
|
.port=(port) ⇒ Object
43
44
45
46
|
# File 'lib/racecar/datadog.rb', line 43
def port=(port)
@port = port
clear
end
|
.statsd ⇒ Object
21
22
23
|
# File 'lib/racecar/datadog.rb', line 21
def statsd
@statsd ||= ::Datadog::Statsd.new(host, port, namespace: namespace, tags: tags)
end
|
.statsd=(statsd) ⇒ Object
25
26
27
28
|
# File 'lib/racecar/datadog.rb', line 25
def statsd=(statsd)
clear
@statsd = statsd
end
|
57
58
59
|
# File 'lib/racecar/datadog.rb', line 57
def tags
@tags ||= []
end
|
61
62
63
64
|
# File 'lib/racecar/datadog.rb', line 61
def tags=(tags)
@tags = tags
clear
end
|