mirage / prometheus

OCaml library for reporting metrics to a Prometheus server
Apache License 2.0
49 stars 27 forks source link

Impossible to add several metrics with equal names #38

Closed freehck closed 2 years ago

freehck commented 2 years ago

Shortly, using the Prometheus module I get (Failure "response_time_ms already registered"). And was going to get the following: response_time_ms{method="GET", url="https://google.com/"} 77.975000 response_time_ms{method="GET", url="https://ya.ru/"} 148.693000

Asetmap as a base was probably not a good choice, as it's quite common to export metrics of the same name but with different labels. Prometheus allows it. Telegraf allows it. This module doesn't. => Bug.

freehck commented 2 years ago

Sorry, my fault. Just got I can modify a collector, and LabelSetMap uses specifically labels as keys.