Sha256: 7896b83f47df97adc82500644236a64773c31ba00c4a11938b2928b4cf092deb

Contents?: true

Size: 457 Bytes

Versions: 24

Compression:

Stored size: 457 Bytes

Contents

module Bugsnag::Middleware
  ##
  # Attaches Sidekiq job information to an error report
  class Sidekiq
    def initialize(bugsnag)
      @bugsnag = bugsnag
    end

    def call(report)
      sidekiq = report.request_data[:sidekiq]
      if sidekiq
        report.add_tab(:sidekiq, sidekiq)
        report.context ||= "#{sidekiq[:msg]['wrapped'] || sidekiq[:msg]['class']}@#{sidekiq[:msg]['queue']}"
      end
      @bugsnag.call(report)
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
bugsnag-6.22.1 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.21.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.20.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.19.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.18.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.17.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.16.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.15.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.14.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.13.1 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.13.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.12.2 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.12.1 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.12.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.11.1 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.11.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.10.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.9.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.8.0 lib/bugsnag/middleware/sidekiq.rb
bugsnag-6.7.3 lib/bugsnag/middleware/sidekiq.rb