Update to error_tracker 0.9

Includes amendments resulting from new events, and proper handling of
the muted attribute
This commit is contained in:
Claudio Ortolina
2026-05-03 14:46:40 +01:00
parent a8eb4fe0b5
commit 84012cbd1c
4 changed files with 99 additions and 6 deletions
+24 -1
View File
@@ -30,10 +30,32 @@ defmodule ErrorTracker.ErrorNotifier do
reason = truncate_reason(metadata.occurrence.reason)
{_result, new_state} =
maybe_notify(metadata.occurrence, false, "New Error! (#{reason})", state)
maybe_notify(
metadata.occurrence,
metadata.error.muted,
"New Error! (#{reason})",
state
)
{:noreply, new_state}
[:error_tracker, :error, :unresolved] ->
if metadata.occurrence do
reason = truncate_reason(metadata.occurrence.reason)
{_result, new_state} =
maybe_notify(
metadata.occurrence,
metadata.error.muted,
"Regression! (#{reason})",
state
)
{:noreply, new_state}
else
{:noreply, state}
end
[:error_tracker, :occurrence, :new] ->
reason = truncate_reason(metadata.occurrence.reason)
@@ -67,6 +89,7 @@ defmodule ErrorTracker.ErrorNotifier do
defp attach_telemetry do
events = [
[:error_tracker, :error, :new],
[:error_tracker, :error, :unresolved],
[:error_tracker, :occurrence, :new]
]