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

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

benhutton
Copy link
Contributor

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.18%. Comparing base (bf8d8c5) to head (536166e).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2503   +/-   ##
=======================================
  Coverage   98.18%   98.18%           
=======================================
  Files         128      128           
  Lines        4837     4845    +8     
=======================================
+ Hits         4749     4757    +8     
  Misses         88       88           
Components Coverage Δ
sentry-ruby 98.57% <100.00%> (ø)
sentry-rails 97.07% <100.00%> (+0.15%) ⬆️
sentry-sidekiq 97.09% <100.00%> (-0.33%) ⬇️
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 94.73% <100.00%> (-1.93%) ⬇️

... 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?

@benhutton
Copy link
Contributor Author

@solnic sorry for the delay. Updated!

@solnic solnic merged commit 4a0f70e into getsentry:master Jan 2, 2025
147 checks passed
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