Skip to content

Commit 5ba8697

Browse files
authored
Fingerprint DBConnection.ConnectionError in Sentry (#2597)
1 parent cb5d8a0 commit 5ba8697

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/sentry_filter.ex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ defmodule Plausible.SentryFilter do
2727
%{event | fingerprint: ["clickhouse", "db_connection", "protocol_error"]}
2828
end
2929

30+
def before_send(
31+
%{
32+
exception: [%{type: "DBConnection.ConnectionError"}],
33+
original_exception: %{reason: reason}
34+
} = event
35+
) do
36+
%{event | fingerprint: ["db_connection", reason]}
37+
end
38+
3039
def before_send(event) do
3140
event
3241
end

0 commit comments

Comments
 (0)