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

problem with metric type #834

Open
leagueofsoups opened this issue Jan 12, 2023 · 3 comments
Open

problem with metric type #834

leagueofsoups opened this issue Jan 12, 2023 · 3 comments

Comments

@leagueofsoups
Copy link

jmx exporter not working through exporter_exporter issues

I get error while processing this metric from client_java:

https://github.com/prometheus/client_java/blame/bdc6f2507a81029c1aec6cd8b5276661bb6c7ee1/simpleclient_hotspot/src/main/java/io/prometheus/client/hotspot/VersionInfoExports.java#L31-L32

metric type Gauge have suffix "_info"

OpenMetrics/suffixes
OpenMetrics/info
prometheus_Python_client/implementation

Can you help fix it?

@leagueofsoups leagueofsoups changed the title incompleate metric type problem with metric type Jan 12, 2023
@fstab
Copy link
Member

fstab commented Jan 12, 2023

Hi @leagueofsoups, it looks like the code you linked above is 2 years old. The current version looks like this:

https://github.com/prometheus/client_java/blob/main/simpleclient_hotspot/src/main/java/io/prometheus/client/hotspot/VersionInfoExports.java

Does upgrading help?

@leagueofsoups
Copy link
Author

Hi @fstab . Thank you for your reply.

The problem reproduce after rebuild jmx exporter with actual java client (tag 0.16.0)

Is it ok?
https://github.com/prometheus/client_java/blob/main/simpleclient_common/src/test/java/io/prometheus/client/exporter/common/TextFormatTest.java#L85-L86

@fstab
Copy link
Member

fstab commented Jan 13, 2023

The test looks good to me. Prometheus text format doesn't support the OpenMetrics Info type, so the type is converted to Gauge. I'm not sure what the issue is.

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

2 participants