shigoto_metrics_handlers (shigoto_metrics v0.1.4)

View Source

telemetry handlers that translate shigoto events into Prometheus updates.

Attached by shigoto_metrics:setup/0. Idempotent: attaching the same HandlerId twice is a no-op. handle/4 is total — a bad event is logged and swallowed rather than raising, because telemetry detaches any handler that throws, which would silently blank out every metric.

Summary

Functions

attach(HandlerId)

-spec attach(term()) -> ok.

detach(HandlerId)

-spec detach(term()) -> ok.

handle(Event, Measurements, Meta, Config)

-spec handle(telemetry:event_name(), map(), map(), term()) -> ok.