aerogear / keycloak-metrics-spi

Adds a Metrics Endpoint to Keycloak
Apache License 2.0
530 stars 152 forks source link

Add _total suffix to metrics of type Counter #98

Open AntoineThebaud opened 3 years ago

AntoineThebaud commented 3 years ago

Description

The counter metrics such as

keycloak_login_attempts
keycloak_logins
keycloak_registrations_errors 
. . .

should be suffixed with _total, as described in prometheus documentation https://prometheus.io/docs/practices/naming/ https://www.robustperception.io/on-the-naming-of-things

Shiva19908 commented 1 year ago

We would also like to have this fix as this is very important. Would this fix come soon?

shaidar commented 9 months ago

When I look at the metrics endpoint, I see that a big chunk of them already have the _total suffix added, ex. keycloak_registrations_errors_total or keycloak_logins_total. However, sifting through this repo, I don't seem to understand how/where that suffix is added, since in the README and the code, it only shows keycloak_logins and keycloak_registrations_errors. Does this happen by the Prometheus client?

hdermois commented 9 months ago

I have the same problem. The documentatie has not been updated, but all the metrics have the suffix "_total" added. Also the dashboard from the grafana market place does not work with this change.

hdermois commented 9 months ago

I have done some digging. It is Prometheus client which does this. In the change between 0.9.0 to 0.16.0 this is the behavior for compatibility reasons. The dashboard on the grafana marketplace and the documentation should be changed.

This issue is already fixed.