[Prometheus JMX exporter] Export String metric as labels
198 views
Skip to first unread message
Guowei Zhang
unread,
Sep 18, 2022, 5:37:06 AM9/18/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Developers
Hi master, Need your help with Prometheus JMX exporter. I have a Spring application with a Bean which has two variables: one is String and another one is Integer. I use org.springframework.jmx.export.annotation.ManagedResource and org.springframework.jmx.export.annotation.ManagedAttribute to export them to JMX, and then use jmx_prometheus_javaagent-0.17.0.jar to collect these custom metrics. The result is that Integer metric is visible, but String metric not. Then I read the source code of prometheus/jmx_exporter, and found that String is not supported yet. So My question:
Is there any way to expose String metric as labels of Integer metric (without code modification, just change configuration of Spring and JMX exporter)?