Class: Barbeque::ExceptionHandler::Sentry
- Inherits:
-
Object
- Object
- Barbeque::ExceptionHandler::Sentry
- Defined in:
- lib/barbeque/exception_handler.rb
Instance Method Summary collapse
- #clear_context ⇒ Object
- #handle_exception(e) ⇒ Object
-
#initialize ⇒ Sentry
constructor
A new instance of Sentry.
- #set_message_context(message_id, message_type) ⇒ Object
Constructor Details
#initialize ⇒ Sentry
Returns a new instance of Sentry.
56 57 58 |
# File 'lib/barbeque/exception_handler.rb', line 56 def initialize ::Sentry.get_current_hub.push_scope end |
Instance Method Details
#clear_context ⇒ Object
60 61 62 63 |
# File 'lib/barbeque/exception_handler.rb', line 60 def clear_context ::Sentry.get_current_hub.pop_scope ::Sentry.get_current_hub.push_scope end |
#handle_exception(e) ⇒ Object
77 78 79 |
# File 'lib/barbeque/exception_handler.rb', line 77 def handle_exception(e) ::Sentry.capture_exception(e) end |
#set_message_context(message_id, message_type) ⇒ Object
67 68 69 70 71 72 73 74 |
# File 'lib/barbeque/exception_handler.rb', line 67 def (, ) ::Sentry.configure_scope do |scope| scope.( message_id: , message_type: ) end end |