-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Log a warning when instrumenting a cache that is not recording stats in CaffeineCacheMetrics #5402
Conversation
...eter-core/src/main/java/io/micrometer/core/instrument/binder/cache/CaffeineCacheMetrics.java
Outdated
Show resolved
Hide resolved
…in CaffeineCacheMetrics See micrometer-metricsgh-5066
The Guava cache also has the same concept, but it doesn't seem to have an API corresponding to |
In addition to logging the warning, we can try not to register meters that depend on the |
That sounds like a good idea to me. It will be more clear we don't have metrics for those rather than saying the metrics for those are 0. Do you want to update this pull request with that or make a separate PR for it? |
@shakuzen Thanks for the feedback! Looking into its implementation details, it seems a bit tricky, so it would be better to be discussed in a separate issue. I can try another PR if it's proven to be okay in the issue. |
I created #5408. |
I created google/guava#7381 to see if it could be improved. |
This PR changes to log a warning when instrumenting a cache that is not recording statistics in the
CaffeineCacheMetrics
.See gh-5066