Per Javadoc (https://docs.oracle.com/en/java/javase/17/docs/api/java.management/javax/management/AttributeList.html)
"For compatibility reasons, it is possible, though highly discouraged, to add objects to an AttributeList that are not instances of Attribute" ... but the scraping code is expecting Attributes. I would say this is not "technically invalid" but doesn't allow processing as written. It would require an exporter code change to process these values. On Tuesday, February 14, 2023 at 6:26:17 PM UTC-5 Alex Brekken wrote: > Hey all, I'm using the prometheus/jmx_exporter javaagent to expose some > metrics for the MongoDB Kafka Connect connector. ( > https://www.mongodb.com/docs/kafka-connector/current/monitoring/#std-label-kafka-monitoring-sink-attributes > ) > > If I add the entire ObjectName to the whitelist ( > "com.mongodb.kafka.connect:*"), I noticed that *none* of the 39 metrics > are getting returned after it scrapes the MBeans. I built the > prometheus/jmx_exporter project locally and am debugging through the code, > pointing the jmxUrl at my running instance of Kafka Connect. When > JMXScraper makes the call to the MBean server to get the AttributeList ( > https://github.com/prometheus/jmx_exporter/blob/main/collector/src/main/java/io/prometheus/jmx/JmxScraper.java#L153) > > instead of getting back a list of Attributes, it gets back a list of > java.lang.Longs. As a result, a few lines later (line 159) the bean never > gets processed because it's not an instance of Attribute. > > Does this just mean that the MongoDB connector code is simply "doing it > wrong" when it comes to exposing these MBeans? Using JConsole I can view > the MBeans and see the values, but I'm not sure that necessarily means much > in this context. I'm happy to push on them if that's the right solution, > but I wanted to check here first to make sure there isn't something I'm > missing or misunderstanding. Thanks for any help! > > Alex > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/32c03140-f04b-4486-9ba4-bcfb0be5204cn%40googlegroups.com.

