Class: Sbmt::Outbox::ErrorTracker
- Inherits:
-
Object
- Object
- Sbmt::Outbox::ErrorTracker
- Defined in:
- lib/sbmt/outbox/error_tracker.rb
Class Method Summary collapse
Class Method Details
.error(message, params = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/sbmt/outbox/error_tracker.rb', line 7 def error(, params = {}) unless defined?(Sentry) Outbox.logger.log_error(, params) return end Sentry.with_scope do |scope| scope.set_contexts(contexts: params) if .is_a?(Exception) Sentry.capture_exception(, level: :error) else Sentry.(, level: :error) end end end |