client_java
client_java copied to clipboard
problem with metric type
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?
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?
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
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.