Sha256: 3cabfecf74d99b1700285e5e04cab888bcd532eee6cf98975dd624f727a23317

Contents?: true

Size: 454 Bytes

Versions: 3

Compression:

Stored size: 454 Bytes

Contents

module Eventboss
  module ErrorHandlers
    class Sentry
      def call(exception, context = {})
        eventboss_context = { component: 'eventboss' }
        eventboss_context[:action] = context[:processor].class.to_s if context[:processor]

        ::Sentry.with_scope do |scope|
          scope.set_tags(
            context.merge(eventboss_context)
          )
          ::Sentry.capture_exception(exception)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eventboss-1.9.1 lib/eventboss/error_handlers/sentry.rb
eventboss-1.9.0 lib/eventboss/error_handlers/sentry.rb
eventboss-1.8.1 lib/eventboss/error_handlers/sentry.rb