Exclude Sidekiq retry errors from reportable Sentry events
What does this MR do and why?
Contributes to gitlab-com/gl-infra/scalability#1980
Problem
We use a specific exception (JobReplicaNotUpToDate) to interrupt Sidekiq job and trigger a retry. But Sentry receives an event for each of these exceptions. It just generates noise.
Solution
- Add a general RetryError class for Sidekiq
- Exclude this class from Sentry reports
before_send
method allows to reject the exception event before it's
sent. (see details:
https://docs.sentry.io/platforms/ruby/configuration/filtering/#using-platformidentifier-namebefore-send-).
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin