Fingerprint DBConnection.ConnectionError in Sentry (#2597)

This commit is contained in:
Adam Rutkowski 2023-01-16 13:05:56 +01:00 committed by GitHub
parent cb5d8a0d25
commit 5ba8697c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,15 @@ defmodule Plausible.SentryFilter do
%{event | fingerprint: ["clickhouse", "db_connection", "protocol_error"]}
end
def before_send(
%{
exception: [%{type: "DBConnection.ConnectionError"}],
original_exception: %{reason: reason}
} = event
) do
%{event | fingerprint: ["db_connection", reason]}
end
def before_send(event) do
event
end