This is more a question than a bug report, as I'm not sure it's not a PEBKAC..
I have an application in Spring-Boot 1.5.7 which I wanted to upgrade to 2.0.0.M7. But I saw that the metrics in actuator changed a lot (not a bad thing) but most importantly, 2 of them disappeared:
cache.*httpsessions.*I manage to reproduce this with https://github.com/alecharp/problem-actuator-upgrade. There are 2 tags on the repository:
1.5.9 reproduce the "it's working" case where you have behind http://localhost:8080/metrics the two entries which I need (cache and httpsessions)2.0.0.M7 reproduce the "it's not working" case where the two entries have disappeared from http://localhost:8080/actuator/metrics.I tried to have an as-simple-as-possible repository, only using caffeine dependency to act as the cache.
Thanks in advance for your help.
The httpsessions.* metrics are provided in Boot 1.5 by TomcatPublicMetrics. That class was removed as part of the Micrometer migration, and I'm not aware of a replacement. There isn't one in Boot itself and I don't think Micrometer has one either.
thanks @wilkinsona for the quick reply. it seems that the cache.* was missing its auto-configuration as @snicoll pointed. Any chance to have the TomcatPublicMetrics ported to here?
@alecharp and @wilkinsona I created #257 to create the TomcatPublicMetrics equivalent.
Thanks! I think we can close this, as everything I reported is now track on their own tickets.
References:
Most helpful comment
The
httpsessions.*metrics are provided in Boot 1.5 byTomcatPublicMetrics. That class was removed as part of the Micrometer migration, and I'm not aware of a replacement. There isn't one in Boot itself and I don't think Micrometer has one either.