Sha256: 2a7ab9102b78949f4af402cb85f048587f440dc1c58479380e070a6ee1873dad

Contents?: true

Size: 577 Bytes

Versions: 7

Compression:

Stored size: 577 Bytes

Contents

module Upperkut
  module Middlewares
    class Rollbar
      def call(worker, items)
        ::Rollbar.reset_notifier!
        yield
      rescue Exception => e
        handle_exception(e, worker, items)
        raise e
      end

      private

      def handle_exception(e, worker, items)
        scope = {
          framework: "Upperkut #{::Upperkut::VERSION}",
          request:   { params: { items_size: items.size } },
          context:   worker.name
        }

        ::Rollbar.scope(scope).error(e, :use_exception_level_filters => true)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
upperkut-0.7.0 lib/upperkut/middlewares/rollbar.rb
upperkut-0.6.0 lib/upperkut/middlewares/rollbar.rb
upperkut-0.5.2 lib/upperkut/middlewares/rollbar.rb
upperkut-0.5.1 lib/upperkut/middlewares/rollbar.rb
upperkut-0.5.0 lib/upperkut/middlewares/rollbar.rb
upperkut-0.4.6 lib/upperkut/middlewares/rollbar.rb
upperkut-0.4.5 lib/upperkut/middlewares/rollbar.rb