fix(portal): Silence cluster challenge reply errors (#9344)

Issues with node connections will be reported by the threshold logger.
This commit is contained in:
Jamil
2025-06-01 10:29:07 -07:00
committed by GitHub
parent 0c0ab13b90
commit 42bccfd5e5

View File

@@ -1,15 +1,17 @@
defmodule Domain.Telemetry.Sentry do
# These happen when libcluster loses connection to a node, which is normal during deploys.
# We have threshold-based error logging in Domain.Cluster.GoogleComputeLabelsStrategy to report those.
@silenced_messages [
"Connection attempt from node ~w rejected. Invalid challenge reply.",
"Node ~p not responding **~n** Removing (timedout) connection"
]
def before_send(%{original_exception: %{skip_sentry: skip_sentry}}) when skip_sentry do
nil
end
def before_send(event) do
if String.contains?(
event.message,
"Node ~p not responding **~n** Removing (timedout) connection"
) do
# This happens when libcluster loses connection to a node, which is normal during deploys.
# We have threshold-based error logging in Domain.Cluster.GoogleComputeLabelsStrategy to report those.
if Enum.any?(@silenced_messages, &String.contains?(event.message, &1)) do
nil
else
event