diff --git a/CHANGELOG.md b/CHANGELOG.md index 920b85fb2..954b4ac33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/sentry-sidekiq/lib/sentry/sidekiq/configuration.rb b/sentry-sidekiq/lib/sentry/sidekiq/configuration.rb index b6ef3856c..eea6f4c35 100644 --- a/sentry-sidekiq/lib/sentry/sidekiq/configuration.rb +++ b/sentry-sidekiq/lib/sentry/sidekiq/configuration.rb @@ -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 diff --git a/sentry-sidekiq/spec/sentry/sidekiq/configuration_spec.rb b/sentry-sidekiq/spec/sentry/sidekiq/configuration_spec.rb index 7e9066ffe..2bcab6c58 100644 --- a/sentry-sidekiq/spec/sentry/sidekiq/configuration_spec.rb +++ b/sentry-sidekiq/spec/sentry/sidekiq/configuration_spec.rb @@ -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)