-
Notifications
You must be signed in to change notification settings - Fork 961
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
Expose per-region statistics for Hibernate L2 cache #2097
Comments
Nice! Let's do this. |
…region name as a tag
I'm not familiar with L2 cache regions. Are these static or dynamic? Will we know at binding time what all the regions are, or could they change? |
Good question, @shakuzen. My assumption was that once the |
This tags the L2 cache stats counters by region so more fine-grained information is available (per entity/collection). The totals available before are the sum of all the regions, and therefore still available with summing. Resolves #2097
Looks like the method |
As of Micrometer 1.5, the
HibernateMetrics
binder exposes L2 cache statistics from theorg.hibernate.stat.Statistics
interface. This is useful, but it would be better if this were done on a per-cache-region basis, giving us more fine-grained per-entity and per-collection information.This can be done by using
getSecondLevelCacheRegionNames
andgetSecondLevelCacheStatistics
, giving you aSecondLevelCacheStatistics
object.As well as providing the same hit/miss/put stats you get from the higher-level
Statistics
interface, you also get cache size and memory usage stats. These can then be tagged with the region name.The text was updated successfully, but these errors were encountered: