Class: BloombergLP::EventReportingHandler::StartHandler

Inherits:
Chef::Handler
  • Object
show all
Defined in:
lib/event_reporting_handler/start_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_url = '', sentry_config = {}) ⇒ StartHandler



13
14
15
16
# File 'lib/event_reporting_handler/start_handler.rb', line 13

def initialize(http_url='',sentry_config={})
  @http_url = http_url
  @sentry_config = sentry_config
end

Instance Attribute Details

#http_urlObject (readonly)

Returns the value of attribute http_url.



11
12
13
# File 'lib/event_reporting_handler/start_handler.rb', line 11

def http_url
  @http_url
end

Instance Method Details

#reportObject



18
19
20
21
22
23
# File 'lib/event_reporting_handler/start_handler.rb', line 18

def report
  Chef::Log.debug("Running start handler with http_url: #{http_url} and sentry_config: #{sentry_config} ")
  http_event_reporter = HttpEventReporter.new(http_url,sentry_config,@run_status)
  @run_status.events.register(http_event_reporter)
  http_event_reporter.run_started(@run_status)
end