client_java icon indicating copy to clipboard operation
client_java copied to clipboard

problem with metric type

Open leagueofsoups opened this issue 2 years ago • 3 comments

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 avatar Jan 12 '23 13:01 leagueofsoups

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?

fstab avatar Jan 12 '23 20:01 fstab

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

leagueofsoups avatar Jan 13 '23 00:01 leagueofsoups

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.

fstab avatar Jan 13 '23 08:01 fstab