Filtering Sentry.CrashErrors via Sentry.EventFilter
Will support for filtering these be something on the agenda?
We have handle_sasl_reports: true
together with:
config :logger,
backends: [:console, Sentry.LoggerBackend]
This gives us for example NoRouter errors from Phoenix in the form of Sentry.CrashErrors
I have been poking around in Sentry.LoggerBackend and it seems as the :crash_reason is available with for example the Phoenix.Router.NoRouteError. Adding it to the Sentry.CrashError struct would make it way nicer to filter on than looking up stuff in the general message string.
Thanks for opening an issue!
The Erlang logger has deprecated SASL as of OTP 21, so it's unlikely specific handling of SASL logs will be added.
If you're unable to disable SASL, one less than ideal option is to search for specific errors in the message along the lines of:
def exclude_exception?(event, :logger) do
if Regex.match?(~r/Phoenix\.Router\.NoRouteError/, event.message) do
true
else
false
end
end
Since the structure of SASL metadata is different, Sentry.LoggerBackend wraps it in a Sentry.CrashError with a message from the original error.
Closing this issue for now 🙂