Do not log Sentry.CrashError to Sentry

Stops recursive error logging to sentry
pull/2012/head
Uku Taht 4 years ago
parent 37dddb62d9
commit 6fbb0a24a8

@ -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,

@ -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
Loading…
Cancel
Save