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_config = {}, sentry_config = {}) ⇒ StartHandler

Returns a new instance of StartHandler.



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

def initialize(http_config = {}, sentry_config = {})
  @http_config = http_config
  @sentry_config = sentry_config
end

Instance Method Details

#reportObject



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

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