Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report_after_job_retries does not report errors for jobs with 0 retries #1556

Closed
TAGraves opened this issue Sep 1, 2021 · 1 comment · Fixed by #1557
Closed

report_after_job_retries does not report errors for jobs with 0 retries #1556

TAGraves opened this issue Sep 1, 2021 · 1 comment · Fixed by #1557
Assignees
Projects
Milestone

Comments

@TAGraves
Copy link
Contributor

TAGraves commented Sep 1, 2021

Describe the bug
I was excited to see the report_after_job_retries feature get released in sentry-sidekiq this morning. Unfortunately we have many jobs configured with sidekiq_options retry: 0 and failures in these jobs do not appear to be sent to Sentry. Thankfully the fix looks pretty simple so I will open a PR with an attempt at fixing it.

To Reproduce
Set config.sidekiq.report_after_job_retries = true and then configure a job that will fail with sidekiq_options retry: 0. Enqueue that job and observe that it ends up in the Sidekiq dead queue and does not report the error to Sentry.

Expected behavior
The error should be reported to Sentry.

Actual behavior
The error is not reported to Sentry.

Environment

  • Ruby Version: 3.0.2
  • SDK Version: 4.7
  • Integration Versions (if any): Sidekiq 6.2.2

Sentry Config

Sentry.init do |config|
  config.sidekiq.report_after_job_retries = true
end
@st0012 st0012 added this to the 4.7.1 milestone Sep 1, 2021
@st0012 st0012 added this to To do in 4.x via automation Sep 1, 2021
4.x automation moved this from To do to Done Sep 1, 2021
@st0012
Copy link
Collaborator

st0012 commented Sep 1, 2021

@TAGraves your fix has been released now. thanks again 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.x
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants