Class: BloombergLP::EventReportingHandler::StartHandler

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of StartHandler.



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

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

Instance Method Details

#reportObject



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

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