Class: Appsignal::Integrations::SidekiqDeathHandler Private

Inherits:
Object
  • Object
show all
Defined in:
lib/appsignal/integrations/sidekiq.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Handler for job death events. We get notified when a job has exhausted its retries.

This is called before the SidekiqErrorHandler so it doesn’t need to worry about completing the transaction.

Introduced in Sidekiq 5.1.

Instance Method Summary collapse

Instance Method Details

#call(_job_context, exception) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



16
17
18
19
20
21
# File 'lib/appsignal/integrations/sidekiq.rb', line 16

def call(_job_context, exception)
  return unless Appsignal.config[:sidekiq_report_errors] == "discard"

  transaction = Appsignal::Transaction.current
  transaction.set_error(exception)
end