class PagingDatadogClient

Attributes

datadog_recipient[R]

Public Class Methods

new(datadog_recipient, datadog_client) click to toggle source
# File lib/bosh/monitor/plugins/paging_datadog_client.rb, line 4
def initialize(datadog_recipient, datadog_client)
  @datadog_recipient = datadog_recipient
  @datadog_client = datadog_client
end

Public Instance Methods

emit_event(event) click to toggle source
# File lib/bosh/monitor/plugins/paging_datadog_client.rb, line 13
def emit_event(event)
  event_hash = event.to_hash
  new_message = if event.priority == "normal"
                  "#{event.msg_text} @#{@datadog_recipient}"
                else
                  event.msg_text
                end
  new_event = Dogapi::Event.new(new_message, event_hash)

  @datadog_client.emit_event(new_event)
end
emit_points(metric, points, options={}) click to toggle source
# File lib/bosh/monitor/plugins/paging_datadog_client.rb, line 9
def emit_points(metric, points, options={})
  @datadog_client.emit_points(metric, points, options)
end