logs
Some checks failed
CI/CD Pipeline / build (push) Has been cancelled

This commit is contained in:
2026-03-09 15:25:18 -06:00
parent 76c4098a19
commit 9a0203dac4
5 changed files with 54 additions and 8 deletions

View File

@@ -4,6 +4,14 @@ defmodule ElixirAi.Application do
@impl true
def start(_type, _args) do
# Attach telemetry handler to filter health check logs
:telemetry.attach(
"filter-health-logs",
[:phoenix, :endpoint, :stop],
&filter_health_logs/4,
nil
)
children = [
ElixirAiWeb.Telemetry,
ElixirAi.Repo,
@@ -39,4 +47,14 @@ defmodule ElixirAi.Application do
ElixirAiWeb.Endpoint.config_change(changed, removed)
:ok
end
# Filter health check requests from telemetry logs
defp filter_health_logs(_event, _measurements, %{conn: %{request_path: "/health"}}, _config) do
:ok
end
defp filter_health_logs(event, measurements, metadata, config) do
# Forward to default Phoenix logger
:telemetry.execute(event, measurements, metadata)
end
end