lib/sentry/sidekiq/error_handler.rb in sentry-sidekiq-4.7.0 vs lib/sentry/sidekiq/error_handler.rb in sentry-sidekiq-4.7.1
- old
+ new
@@ -11,10 +11,10 @@
scope = Sentry.get_current_scope
scope.set_transaction_name(context_filter.transaction_name) unless scope.transaction_name
retry_option = context.dig(:job, "retry")
- if Sentry.configuration.sidekiq.report_after_job_retries && retry_option.is_a?(Integer)
+ if Sentry.configuration.sidekiq.report_after_job_retries && retry_option.is_a?(Integer) && retry_option.positive?
retry_count = context.dig(:job, "retry_count")
if retry_count.nil? || retry_count < retry_option - 1
return
end
end