我在我的项目(https://github.com/blemale/scaffeine)中使用了Scaffeine,这是一个针对咖啡因(https://github.com/ben-manes/caffeine)的Scala包装器。我的指标API(https://github.com/Segence/kamon-jmx-collector)中还嵌入了一个Prometheus JMX收集器。
但是,当我启动应用程序时,在VisualVM中我真的看不到任何MBeans
的咖啡因。
另外,在查看caffeine项目时,我发现在caffeine/jcache/src/main/resources/reference.conf
中有一个JMX监视配置:
monitoring {
# If cache statistics should be recorded and externalized
statistics = false
# If the configuration should be externalized
management = false
}
两者都设置为false。有没有一种方法可以配置caffeine,以便将MBeans暴露给JMX?