New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use MicronautCaffeineCacheMetrics.monitor if there is caches section in application.yml #309
Comments
I raised this in gitter, but can't find a way of linking, but the search is |
Try changing
Note you have to use the |
Excellent, I can now see the values in prometheus, and no errors.
|
@graemerocher Do you understand the need for https://github.com/micronaut-projects/micronaut-micrometer/blob/master/micrometer-core/src/main/java/io/micronaut/configuration/metrics/binder/cache/MicronautCaffeineCacheMetrics.java ? We relocate caffeine in core but I don't think any of the caches we create are setup for metrics |
Should be deprecated and removed. Also the JAR jared version of caffeine should be removed IMO |
Expected Behavior
Upgrading an existing application from 2.x to 3.x should not fail when using both MicronautCaffeineCacheMetrics.monitor and a caches section (with cacheable functions in the application).
Actual Behaviour
Application fails to startup with error message:
Steps To Reproduce
Download the example application provided, and run it.
Removing the "caches" entries from application.yml will stop it failing, but then doesn't provide statistics on the prometheus endpoint.
Environment Information
JDK 11, Linux various.
Example Application
https://github.com/markjfisher/mn-cache-graphql-monitor
Version
3.1.3
The text was updated successfully, but these errors were encountered: