mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(portal): fix sentry before_send when message is nil (#9349)
A regression was introduced in #9242 where it appears that some Sentry events don't contain messages, so the filtering module is updated only to act on events with messages.
This commit is contained in:
@@ -3,9 +3,9 @@ defmodule Domain.Telemetry.Sentry do
|
||||
nil
|
||||
end
|
||||
|
||||
def before_send(event) do
|
||||
def before_send(%{message: message} = event) when is_binary(message) do
|
||||
if String.contains?(
|
||||
event.message,
|
||||
message,
|
||||
"Node ~p not responding **~n** Removing (timedout) connection"
|
||||
) do
|
||||
# This happens when libcluster loses connection to a node, which is normal during deploys.
|
||||
@@ -15,4 +15,6 @@ defmodule Domain.Telemetry.Sentry do
|
||||
event
|
||||
end
|
||||
end
|
||||
|
||||
def before_send(event), do: event
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user