diff --git a/config/runtime.exs b/config/runtime.exs index 37bd592a5..5096c64ea 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -229,7 +229,8 @@ config :sentry, enable_source_code_context: true, root_source_code_path: [File.cwd!()], client: Plausible.Sentry.Client, - send_max_attempts: 2 + send_max_attempts: 1, + filter: Plausible.SentryFilter config :logger, Sentry.LoggerBackend, capture_log_messages: true, diff --git a/lib/sentry_filter.ex b/lib/sentry_filter.ex new file mode 100644 index 000000000..7c7f7219d --- /dev/null +++ b/lib/sentry_filter.ex @@ -0,0 +1,6 @@ +defmodule Plausible.SentryFilter do + @behaviour Sentry.EventFilter + + def exclude_exception?(%Sentry.CrashError{}, _source), do: true + def exclude_exception?(exception, source), do: false +end