Class LoggingAlertSink

java.lang.Object
com.kingsrook.qqq.backend.core.alerts.LoggingAlertSink
All Implemented Interfaces:
AlertSinkInterface

public class LoggingAlertSink extends Object implements AlertSinkInterface
The default alert sink, used when no alerts implementation is installed: it logs. INFO signals log at INFO, WARNING and above at WARN. Logging is rate-limited per (type, dedupKey), so a producer that raises the same alert every few seconds writes one line per window, not thousands. Heartbeats are not logged (they are expected, frequent and not a problem). Notifications log at INFO (WARN for ERROR and CRITICAL), rate-limited per (category, sourceKey or title). With this sink, producer code paths are identical with and without an alerts implementation - which is the point.
  • Field Details

    • RATE_LIMIT_WINDOW

      public static final Duration RATE_LIMIT_WINDOW
      how long to stay quiet about a key after logging it.
  • Constructor Details

    • LoggingAlertSink

      public LoggingAlertSink()
  • Method Details