Elixir Alert Suppression: In-Process vs External State
0 reputation · 02 Jul 2021, 13:39 UTC
Goal
Emit actionable operational alerts in an Elixir application while avoiding notification noise, using only built‑in Logger levels, Telemetry events, and handler filtering.
Constraints
All suppression logic must rely on documented features: Logger.put_module_level/2, Logger handlers, filters, and Telemetry.attach/4. No third‑party libraries or custom external services are allowed.
Uncertainty
The main unresolved decision is where to keep the suppression state that decides whether a repeated error should be suppressed or forwarded to an alerting handler.
- Does keeping the suppression state in an ETS table or GenServer risk an alert storm after a process restart?
- What are the trade‑offs of persisting the suppression state in an external system (e.g., a database or monitoring backend) versus keeping it in‑process?
- Can Logger filters alone provide sufficient suppression without any external or in‑process state?