ocharles / prometheus-effect

Yet another Haskell Prometheus client
https://hackage.haskell.org/package/prometheus-effect
BSD 3-Clause "New" or "Revised" License
11 stars 1 forks source link

Equally-named metrics with different labels #5

Open NicolasT opened 6 years ago

NicolasT commented 6 years ago

It seems to be impossible right now to register multiple Metrics with the same MetricName but a different set of static labels (this would result in MetricCollision being thrown). Is this intentional?

I guess one could, in theory, work around this using addLabel and treat the static labels as if they were dynamic, but this has a performance impact, and is just complicated, especially when the labels themselves are generated at initialization from some other source, and the number of them is unknown.

Looking for some advice here 😃