Module notifier_metrics_logger_handler

A logger_handler that turns every structured log event (?LOG_*(#{what := EventName, ...})) into a Prometheus counter increment via notifier_metrics.

Description

A logger_handler that turns every structured log event (?LOG_*(#{what := EventName, ...})) into a Prometheus counter increment via notifier_metrics. Registered as an additional handler in sys.config alongside the default (flatlog) handler — it never formats or writes output, so it can't affect what operators see in kubectl logs / your log store.

Events without a what field (raw strings, io:format-style reports from third-party libraries) are silently ignored — this handler only measures this application's own structured events.

Function Index

log/2logger_handler callback — never allowed to throw, since a crashing handler is disabled by the logger framework, silently losing metrics for the rest of the node's lifetime.

Function Details

log/2

log(Event::logger:log_event(), Config::logger:handler_config()) -> ok

logger_handler callback — never allowed to throw, since a crashing handler is disabled by the logger framework, silently losing metrics for the rest of the node's lifetime.


Generated by EDoc