Skip to content

Commit 7ad595a

Browse files
Ignore Sidekiq::JobRetry::Handled exception (#2337)
* Ignore Sidekiq::JobRetry::Handled exception * Style/TrailingCommaInArrayLiteral * Update CHANGELOG --------- Co-authored-by: Karl Entwistle <karl@biggerpockets.com>
1 parent 4a0f70e commit 7ad595a

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
### Bug Fixes
3939

40+
- Ignore internal Sidekiq::JobRetry::Handled exception [#2337](https://github.com/getsentry/sentry-ruby/pull/2337)
4041
- Fix Vernier profiler not stopping when already stopped [#2429](https://github.com/getsentry/sentry-ruby/pull/2429)
4142
- Fix `send_default_pii` handling in rails controller spans [#2443](https://github.com/getsentry/sentry-ruby/pull/2443)
4243
- Fixes [#2438](https://github.com/getsentry/sentry-ruby/issues/2438)

sentry-sidekiq/lib/sentry/sidekiq/configuration.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ class Configuration
1111
end
1212

1313
module Sidekiq
14-
IGNORE_DEFAULT = ["Sidekiq::JobRetry::Skip"]
14+
IGNORE_DEFAULT = [
15+
"Sidekiq::JobRetry::Skip",
16+
"Sidekiq::JobRetry::Handled"
17+
]
1518

1619
class Configuration
1720
# Set this option to true if you want Sentry to only capture the last job

sentry-sidekiq/spec/sentry/sidekiq/configuration_spec.rb

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
expect(config.excluded_exceptions).to include("Sidekiq::JobRetry::Skip")
1616
end
1717

18+
it "adds Sidekiq::JobRetry::Handled to the ignore list" do
19+
config = Sentry::Configuration.new
20+
21+
expect(config.excluded_exceptions).to include("Sidekiq::JobRetry::Handled")
22+
end
23+
1824
describe "#report_after_job_retries" do
1925
it "has correct default value" do
2026
expect(subject.report_after_job_retries).to eq(false)

0 commit comments

Comments
 (0)