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

Metric type INFO is not registered in prometheus client model type #2420

Open
alileza opened this issue Jun 14, 2024 · 2 comments
Open

Metric type INFO is not registered in prometheus client model type #2420

alileza opened this issue Jun 14, 2024 · 2 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@alileza
Copy link

alileza commented Jun 14, 2024

What happened:
The fact that INFO is not a valid type on prometheus client model, it prevent us to use prometheus tooling such as prom2json. Parsing custom resource definition that contains info would cause an error like unknown metric type "info"

What you expected to happen:
I would expect kube-state-metrics with a custom resource definition info should still return a valid type that recognizable by prometheus client_model. I'm thinking either UNTYPED or simply GAUGE with value always 1 should be acceptable

How to reproduce it (as minimally and precisely as possible):
Create custom resource definition with type info, then try to parse it using prom2json, like curl localhost:8080/metrics | prom2json

error reading metrics: reading text format failed: text format parsing error in line 26: unknown metric type "info"

Anything else we need to know?:

Environment:

  • kube-state-metrics version: 89f0db6
  • Kubernetes version (use kubectl version): non-relevant
  • Cloud provider or hardware configuration: non-relevant
  • Other info: N/A
@alileza alileza added the kind/bug Categorizes issue or PR as related to a bug. label Jun 14, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jun 14, 2024
@Serializator
Copy link
Contributor

Though not exactly the same context, a similar discussion about this happened in #2248 in November of last year as well as a newer issue in #2366 from last month.

@dgrisonnet
Copy link
Member

/assign @rexagod
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

5 participants