Sha256: 77f2f13f7d979597210b4aee762c8580cd8228aec05223a21c9a6ff8fd34e70c
Contents?: true
Size: 802 Bytes
Versions: 12
Compression:
Stored size: 802 Bytes
Contents
# encoding: utf-8 PARAM_BLACKLIST = ['backtrace', 'error_backtrace', 'error_message', 'error_class'] if Sidekiq::VERSION < '3' module Rollbar class Sidekiq def call(worker, msg, queue) begin yield rescue Exception => e params = msg.reject{ |k| PARAM_BLACKLIST.include?(k) } Rollbar.report_exception(e, :params => params) raise end end end end Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.add Rollbar::Sidekiq end end else Sidekiq.configure_server do |config| config.error_handlers << Proc.new do |e, context| params = context.reject{ |k| PARAM_BLACKLIST.include?(k) } Rollbar.report_exception(e, :params => params) end end end
Version data entries
12 entries across 12 versions & 1 rubygems