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

Use attempt_threshold to skip reporting on first N attempts #2503

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benhutton
Copy link

This is an implementation for #1632.

I am bringing over the concept of attempt_threshold from Honeybadger.

Retry counting is a bit tricky, and so I included a comment based on a GH comment from Honeybadger.

There are two relatively arbitrary decisions I made here that you should validate:

  1. I am 1-indexing attempts, not 0-indexing
  2. I am skipping until the number of attempts equals the attempt_threshold. Alternatively, we could skip until number of attempts is greater than attempt_threshold.

Thanks for your consideration!

Copy link

codecov bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.20%. Comparing base (d8c1066) to head (97f9969).
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2503   +/-   ##
=======================================
  Coverage   98.19%   98.20%           
=======================================
  Files         128      128           
  Lines        4833     4843   +10     
=======================================
+ Hits         4746     4756   +10     
  Misses         87       87           
Components Coverage Δ
sentry-ruby 98.57% <ø> (+<0.01%) ⬆️
sentry-rails 97.07% <ø> (ø)
sentry-sidekiq 97.48% <100.00%> (+0.06%) ⬆️
sentry-resque 92.85% <ø> (ø)
sentry-delayed_job 95.65% <ø> (ø)
sentry-opentelemetry 99.31% <ø> (ø)
Files with missing lines Coverage Δ
sentry-sidekiq/lib/sentry/sidekiq/error_handler.rb 97.22% <100.00%> (+0.55%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Collaborator

@solnic solnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this LGTM. Could you update the CHANGELOG.md (top level one) too so that we can get a green build?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants