Sha256: 69459f927c9c98104015f383bb1f1f7f429aa7bf0b37e59078c1466d61bec26d

Contents?: true

Size: 479 Bytes

Versions: 53

Compression:

Stored size: 479 Bytes

Contents

# encoding: utf-8

module Rollbar
  class Sidekiq
    def call(worker, msg, queue)
      begin
        yield
      rescue => e
        msg.delete('backtrace')
        msg.delete('error_backtrace')
        msg.delete('error_message')
        msg.delete('error_class')

        Rollbar.report_exception(e, :params => msg)
        raise
      end
    end
  end
end

Sidekiq.configure_server do |config|
  config.server_middleware do |chain|
    chain.add Rollbar::Sidekiq
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
rollbar-0.9.9 lib/rollbar/sidekiq.rb
rollbar-0.9.8 lib/rollbar/sidekiq.rb
rollbar-0.9.7 lib/rollbar/sidekiq.rb
rollbar-0.9.6 lib/rollbar/sidekiq.rb
rollbar-0.9.4 lib/rollbar/sidekiq.rb
rollbar-0.9.3 lib/rollbar/sidekiq.rb
rollbar-0.9.2 lib/rollbar/sidekiq.rb
rollbar-0.9.1 lib/rollbar/sidekiq.rb
rollbar-0.9.0 lib/rollbar/sidekiq.rb
rollbar-0.8.3 lib/rollbar/sidekiq.rb
rollbar-0.8.2 lib/rollbar/sidekiq.rb
rollbar-0.8.1 lib/rollbar/sidekiq.rb
rollbar-0.8.0 lib/rollbar/sidekiq.rb