Sha256: f7e9ee0e1d1257bda74f3d1f16b0fa100bbf40f7b3bd3d66bd85830ea177ef33

Contents?: true

Size: 519 Bytes

Versions: 10

Compression:

Stored size: 519 Bytes

Contents

module Airbrake
  module Rails
    ##
    # Enables support for exceptions occurring in ActiveJob jobs.
    module ActiveJob
      extend ActiveSupport::Concern

      included do
        rescue_from(Exception) do |exception|
          notice = Airbrake.build_notice(exception)

          notice[:context][:component] = self.class.name
          notice[:context][:action] = job_id

          notice[:params] = as_json

          Airbrake.notify(notice)
          raise exception
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
airbrake-5.2.1 lib/airbrake/rails/active_job.rb
airbrake-5.2.0 lib/airbrake/rails/active_job.rb
airbrake-5.1.0 lib/airbrake/rails/active_job.rb
airbrake-5.0.5 lib/airbrake/rails/active_job.rb
airbrake-5.0.4 lib/airbrake/rails/active_job.rb
airbrake-5.0.3 lib/airbrake/rails/active_job.rb
airbrake-5.0.2 lib/airbrake/rails/active_job.rb
airbrake-5.0.1 lib/airbrake/rails/active_job.rb
airbrake-5.0.0 lib/airbrake/rails/active_job.rb
airbrake-5.0.0.rc.1 lib/airbrake/rails/active_job.rb