Filter out user-facing errors from Sentry

This commit is contained in:
Karina Kwiatek 2023-01-28 22:10:14 +01:00
parent 4dcc5dea55
commit 7d5104d09d
1 changed files with 9 additions and 0 deletions

View File

@ -8,4 +8,13 @@ Sentry.init do |config|
# of transactions for performance monitoring.
# We recommend adjusting this value in production
config.traces_sample_rate = 0.25
config.before_send do |event, hint|
if hint[:exception].is_a?(Errors::Base)
# These are used for user-facing errors, not when something goes wrong
nil
end
event
end
end