module Nadir class Sidekiq def self.notify(exception, context) job_params = context[:job].slice('class', 'args', 'retry_count', 'queue', 'jid') location = context[:job]['class'] Nadir.notify exception, job: job_params, location: location end end end ::Sidekiq.configure_server do |config| config.error_handlers << Proc.new { |ex,ctx_hash| Nadir::Sidekiq.notify(ex, ctx_hash) } end