Class: Hallmonitor::Outputters::Datadog
- Inherits:
-
Hallmonitor::Outputter
- Object
- Hallmonitor::Outputter
- Hallmonitor::Outputters::Datadog
- Defined in:
- lib/hallmonitor/outputters/datadog.rb
Overview
An outputter for Dogstatsd
Defined Under Namespace
Classes: EventData
Instance Attribute Summary
Attributes inherited from Hallmonitor::Outputter
Instance Method Summary collapse
-
#initialize(dogstatsd, tags: {}) ⇒ Datadog
constructor
Builds a new DogstatsdOutputter.
-
#process(event) ⇒ Object
Sends events to datadog statsd instance.
Constructor Details
#initialize(dogstatsd, tags: {}) ⇒ Datadog
Builds a new DogstatsdOutputter.
16 17 18 19 20 |
# File 'lib/hallmonitor/outputters/datadog.rb', line 16 def initialize(dogstatsd, tags: {}) super('dogstatsd') @tags = {}.merge() @statsd = dogstatsd end |
Instance Method Details
#process(event) ⇒ Object
Sends events to datadog statsd instance
If the event’s value field is a hash, this will send multiple events to statsd with the original name suffixed by the name of the events in the hash
27 28 29 30 |
# File 'lib/hallmonitor/outputters/datadog.rb', line 27 def process(event) event_data = build_event_data(event) write(event_data) end |