Skip to content

Commit

Permalink
Ignore Sidekiq::JobRetry::Handled exception (#2337)
Browse files Browse the repository at this point in the history
* Ignore Sidekiq::JobRetry::Handled exception

* Style/TrailingCommaInArrayLiteral

* Update CHANGELOG

---------

Co-authored-by: Karl Entwistle <[email protected]>
  • Loading branch information
karlentwistle and bp-karl authored Jan 2, 2025
1 parent 4a0f70e commit 7ad595a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

### Bug Fixes

- Ignore internal Sidekiq::JobRetry::Handled exception [#2337](https://github.com/getsentry/sentry-ruby/pull/2337)
- Fix Vernier profiler not stopping when already stopped [#2429](https://github.com/getsentry/sentry-ruby/pull/2429)
- Fix `send_default_pii` handling in rails controller spans [#2443](https://github.com/getsentry/sentry-ruby/pull/2443)
- Fixes [#2438](https://github.com/getsentry/sentry-ruby/issues/2438)
Expand Down
5 changes: 4 additions & 1 deletion sentry-sidekiq/lib/sentry/sidekiq/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ class Configuration
end

module Sidekiq
IGNORE_DEFAULT = ["Sidekiq::JobRetry::Skip"]
IGNORE_DEFAULT = [
"Sidekiq::JobRetry::Skip",
"Sidekiq::JobRetry::Handled"
]

class Configuration
# Set this option to true if you want Sentry to only capture the last job
Expand Down
6 changes: 6 additions & 0 deletions sentry-sidekiq/spec/sentry/sidekiq/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
expect(config.excluded_exceptions).to include("Sidekiq::JobRetry::Skip")
end

it "adds Sidekiq::JobRetry::Handled to the ignore list" do
config = Sentry::Configuration.new

expect(config.excluded_exceptions).to include("Sidekiq::JobRetry::Handled")
end

describe "#report_after_job_retries" do
it "has correct default value" do
expect(subject.report_after_job_retries).to eq(false)
Expand Down

0 comments on commit 7ad595a

Please sign in to comment.