79271623

Date: 2024-12-11 12:03:37
Score: 0.5
Natty:
Report link

I discovered that Spring Boot using Caffeine module is already providing those:

Metrics Exposed by Spring Boot Caffeine

But then, you have to make use of tags to navigate to find what you need:

For example: http://localhost:8090/metrics/cache.gets?tag=cache:bank_codes_cache

Gets as Response:

{
"name": "cache.gets",
"description": "The number of times cache lookup methods have returned a cached (hit) or uncached (newly loaded or null) value (miss).",
"measurements": [
    {
        "statistic": "COUNT",
        "value": 0.0
    }
],
"availableTags": [
    {
        "tag": "cache.manager",
        "values": [
            "cacheManager"
        ]
    },
    {
        "tag": "result",
        "values": [
            "hit",
            "miss"
        ]
    },
    {
        "tag": "name",
        "values": [
            "bank_codes_cache"
        ]
    }
]

}

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: gruerei