Sha256: 30b71b3db093fa13ca596fde2e0d62c8e75b5fa354b28d4b46ca8c158c42909c
Contents?: true
Size: 1.15 KB
Versions: 3
Compression:
Stored size: 1.15 KB
Contents
module Honeybadger module Integrations module DelayedJob class Plugin < ::Delayed::Plugin callbacks do |lifecycle| lifecycle.around(:invoke_job) do |job, &block| begin Honeybadger::Monitor::Trace.instrument("#{job.payload_object.class}#perform", { :source => 'delayed_job', :jid => job.id, :class => job.payload_object.class.name }) do block.call(job) end rescue Exception => error ::Honeybadger.notify_or_ignore( :error_class => error.class.name, :error_message => "#{ error.class.name }: #{ error.message }", :backtrace => error.backtrace, :context => { :job_id => job.id, :handler => job.handler, :last_error => job.last_error, :attempts => job.attempts, :queue => job.queue } ) raise error ensure ::Honeybadger.context.clear! end end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems