Class: Karafka::Instrumentation::Vendors::Appsignal::ErrorsListener

Inherits:
Base
  • Object
show all
Defined in:
lib/karafka/instrumentation/vendors/appsignal/errors_listener.rb

Overview

Listener for reporting errors from both consumers and producers Since we have the same API for WaterDrop and Karafka, we can use one listener with independent instances

Instance Method Summary collapse

Methods inherited from Base

#initialize, #setup

Constructor Details

This class inherits a constructor from Karafka::Instrumentation::Vendors::Appsignal::Base

Instance Method Details

#on_error_occurred(event) ⇒ Object

Sends error details to Appsignal

Parameters:

  • event (Karafka::Core::Monitoring::Event)


23
24
25
# File 'lib/karafka/instrumentation/vendors/appsignal/errors_listener.rb', line 23

def on_error_occurred(event)
  client.report_error(event[:error])
end