Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing or wrong labels for certain metrics #167

Open
npriebe opened this issue Jun 5, 2023 · 3 comments
Open

Missing or wrong labels for certain metrics #167

npriebe opened this issue Jun 5, 2023 · 3 comments

Comments

@npriebe
Copy link

npriebe commented Jun 5, 2023

Description

Hi, I noticed that for certain metrics either labels are missing or the labels give wrong values.

The following metrics still need labels:

keycloak_logins, keycloak_failed_attempts, keycloak_client_logins, keycloak_failed_login_attempts:

With this metric, it was useful to have the username as a label for understanding where the request is being attempted.

keycloak_response_errors:

With this metric, the realm as a label is missing.
Screenshot from 2023-06-05 13-44-38

The following metrics has wrong label values:

keycloak_failed_client_login_attempts:

Here has the label "client_id" wrong values.
Screenshot from 2023-06-05 13-41-54
For the other metrics, the name of the client is set as client_id.
Example:
Screenshot from 2023-06-05 14-02-28

Expected Behavior

Metrics with the described labels.

Actual Behavior

Labels seem to be missing.

Environment

  • Spi version: keycloak-metrics-spi-3.0.0
  • Project Versions: Keycloak 21.1.1
@cebrat
Copy link

cebrat commented Jun 14, 2023

Same for me, with the same spi and keycloak versions.

@trixpan
Copy link

trixpan commented Jun 24, 2023

@npriebe adding username to the metric would increase cardinality and afaik it is generally considered poor practice to do that in TSDBs

e.g.

https://grafana.com/blog/2022/02/15/what-are-cardinality-spikes-and-why-do-they-matter

@souravs17031999
Copy link

souravs17031999 commented Jul 21, 2023

@npriebe did you find any solution ? I find the values as wrong since in every metrics, it's showing me large values (for ex. keycloak_logins_created{realm="xyz",provider="keycloak",client_id="service",} 1.688189803383E9 which converts to 1688189803.383 when displayed in prometheus/grafana
) for all the clients which doesn't make any sense (considering the amount of requests stats)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants