ekg and prometheus-haskell: ensuring metric compatibility for Prometheus alerting
0 reputation · 30 Apr 2025, 10:05 UTC
The goal is to instrument a Haskell application with ekg for custom metric collection and use prometheus‑haskell to expose those metrics through an HTTP /metrics endpoint so that Prometheus can evaluate alert rules.
It is unclear whether ekg’s counters, gauges, and histograms are automatically picked up by the prometheus‑haskell registry or must be manually registered, how metric labels are preserved across the two libraries, and what configuration prevents duplicate exposition or unnecessary runtime overhead.
What steps are required to align ekg metric names with Prometheus exposition format without manual duplication? Which labeling strategy ensures that Prometheus alert rules can reference the original ekg dimensions? Does automatic registration introduce measurable latency in high‑frequency code paths?