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