File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ config :sasl, sasl_error_logger: false
2222
2323config :sentry ,
2424 enable_source_code_context: true ,
25- root_source_code_paths: [ File . cwd! ( ) ]
25+ root_source_code_paths: [ File . cwd! ( ) ] ,
26+ before_send: { Diff.Application , :sentry_before_send }
2627
2728config :logger , level: :info
2829
Original file line number Diff line number Diff line change @@ -34,6 +34,14 @@ defmodule Diff.Application do
3434 :ok
3535 end
3636
37+ def sentry_before_send ( % Sentry.Event { original_exception: exception } = event ) do
38+ cond do
39+ Plug.Exception . status ( exception ) < 500 -> nil
40+ Sentry.DefaultEventFilter . exclude_exception? ( exception , event . source ) -> nil
41+ true -> event
42+ end
43+ end
44+
3745 if Mix . env ( ) == :prod do
3846 defp goth_spec ( ) do
3947 credentials =
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ defmodule Diff.MixProject do
5050 { :phoenix_view , "~> 2.0" } ,
5151 { :phoenix , "~> 1.6" } ,
5252 { :plug_cowboy , "~> 2.1" } ,
53- { :sentry , "~> 10.2 " }
53+ { :sentry , "~> 10.8 " }
5454 ]
5555 end
5656
You can’t perform that action at this time.
0 commit comments