lib/sentry/sidekiq/error_handler.rb in sentry-sidekiq-4.1.1 vs lib/sentry/sidekiq/error_handler.rb in sentry-sidekiq-4.1.2

- old
+ new

@@ -6,18 +6,17 @@ SIDEKIQ_NAME = "Sidekiq".freeze def call(ex, context) return unless Sentry.initialized? context = Sentry::Sidekiq::ContextFilter.new.filter_context(context) + scope = Sentry.get_current_scope + scope.set_transaction_name(transaction_from_context(context)) unless scope.transaction_name - Sentry.with_scope do |scope| - scope.set_transaction_name transaction_from_context(context) - Sentry.capture_exception( - ex, - extra: { sidekiq: context }, - hint: { background: false } - ) - end + Sentry::Sidekiq.capture_exception( + ex, + extra: { sidekiq: context }, + hint: { background: false } + ) end private # this will change in the future: