Class: Eventboss::ErrorHandlers::Sentry

Inherits:
Object
  • Object
show all
Defined in:
lib/eventboss/error_handlers/sentry.rb

Instance Method Summary collapse

Instance Method Details

#call(exception, context = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/eventboss/error_handlers/sentry.rb', line 4

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