mirror of
https://github.com/mirego/accent.git
synced 2024-09-11 10:55:28 +03:00
Add db timeout error grouping in sentry
This commit is contained in:
parent
8e5ff1143f
commit
9c57b53904
@ -33,6 +33,7 @@ config :tesla,
|
||||
adapter: Tesla.Adapter.Hackney
|
||||
|
||||
config :sentry,
|
||||
before_send_event: {Accent.Sentry, :before_send},
|
||||
release: version
|
||||
|
||||
config :ueberauth, Ueberauth, providers: []
|
||||
|
@ -126,7 +126,7 @@ else
|
||||
config :sentry,
|
||||
dsn: System.get_env("SENTRY_DSN"),
|
||||
environment_name: System.get_env("SENTRY_ENVIRONMENT_NAME"),
|
||||
included_environments: ~w(prod production),
|
||||
included_environments: ~w(dev prod production),
|
||||
root_source_code_path: File.cwd!()
|
||||
end
|
||||
|
||||
|
9
lib/accent/sentry.ex
Normal file
9
lib/accent/sentry.ex
Normal file
@ -0,0 +1,9 @@
|
||||
defmodule Accent.Sentry do
|
||||
def before_send(%{exception: [%{type: DBConnection.ConnectionError}]} = event) do
|
||||
%{event | fingerprint: ~w(ecto db_connection timeout)}
|
||||
end
|
||||
|
||||
def before_send(event) do
|
||||
event
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user