Skip to content

Expose per-region statistics for Hibernate L2 cache #2097

@kennymacleod

Description

@kennymacleod

As of Micrometer 1.5, the HibernateMetrics binder exposes L2 cache statistics from the org.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 and getSecondLevelCacheStatistics, giving you a SecondLevelCacheStatistics 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions