lib/tobox/plugins/sentry.rb in tobox-0.1.6 vs lib/tobox/plugins/sentry.rb in tobox-0.2.0

- old
+ new

@@ -128,9 +128,13 @@ event_handler = EventHandler.new(config) config.on_before_event(&event_handler.method(:on_start)) config.on_after_event(&event_handler.method(:on_finish)) config.on_error_event(&event_handler.method(:on_error)) + config.on_error_worker do |error| + ::Sentry.capture_exception(error, hint: { background: false }) + end + ::Sentry::Configuration.attr_reader(:tobox) ::Sentry::Configuration.add_post_initialization_callback do @tobox = Plugins::Sentry::Configuration.new end end