0xERR0R / dex

Prometheus Docker EXporter
52 stars 8 forks source link

Metric names not following guidelines #108

Closed nmmsantos closed 2 months ago

nmmsantos commented 2 months ago

Hi there. There are guidelines on metric and label names on Prometheus documentation: https://prometheus.io/docs/practices/naming.

According to those guidelines, metrics "...should have a suffix describing the unit, in plural form. Note that an accumulating count has total as a suffix, in addition to the unit if applicable."

4 of the metrics:

... are counters and so I believe they should be suffixed to:

Furthermore, there is this metric dex_memory_total_bytes which is declared as a counter. This is part of the container spec and it can't change for the lifetime of the container. But if you recreate the container you can use a different limit, which if set to a lower value would increase the old value by that amount. In that sense, I believe we should change it to a gauge. If we don't change to a gauge, we could at least rename it to dex_memory_total_bytes_total, for the same reasons as above.

Let me know if you are interested in a PR to take care of this.