Files
elixirAI/lib/elixir_ai_web/plugs/health_check_logger.ex
Alex Mickelson 9a0203dac4
Some checks failed
CI/CD Pipeline / build (push) Has been cancelled
logs
2026-03-09 15:25:18 -06:00

20 lines
429 B
Elixir

defmodule ElixirAiWeb.Plugs.HealthCheckLogger do
@moduledoc """
Plug that marks health check requests for filtering.
"""
@behaviour Plug
require Logger
@impl true
def init(opts), do: opts
@impl true
def call(%Plug.Conn{path_info: ["health"]} = conn, _opts) do
# Mark this as a health check for logger filtering
Logger.metadata(health_check: true)
conn
end
def call(conn, _opts), do: conn
end