Environment
Sentry SaaS (sentry.io)
Sentry-sidekiq 5.0
Sidekiq 6.4.0
Steps to Reproduce
- Setup Sentry with
sidekiq.report_after_job_retries set to true
- Create a Sidekiq worker which does not specify the per-worker
retry option
Expected Result
According to Sidekiq documentation, if the retry is not specified, jobs will be retried 25 times. So if a job fails 25 times we expect sentry to report only the last one.
Actual Result
Senty reports every failed retry, ignoring the sidekiq.report_after_job_retries option.
However, setting retry option explicitly solves the issue.
Sidekiq's default retry value is true (boolean), while this code expects integer (sentry-sidekiq/lib/sentry/sidekiq/error_handler.rb)
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
Environment
Sentry SaaS (sentry.io)
Sentry-sidekiq 5.0
Sidekiq 6.4.0
Steps to Reproduce
sidekiq.report_after_job_retriesset totrueretryoptionExpected Result
According to Sidekiq documentation, if the
retryis not specified, jobs will be retried 25 times. So if a job fails 25 times we expect sentry to report only the last one.Actual Result
Senty reports every failed retry, ignoring the
sidekiq.report_after_job_retriesoption.However, setting retry option explicitly solves the issue.
Sidekiq's default retry value is
true(boolean), while this code expects integer (sentry-sidekiq/lib/sentry/sidekiq/error_handler.rb)