Aiven-Open / tiered-storage-for-apache-kafka

RemoteStorageManager for Apache Kafka® Tiered Storage
Apache License 2.0
95 stars 20 forks source link

feat(metrics:cache): Add metric for estimated cache size #332

Closed jeqo closed 1 year ago

jeqo commented 1 year ago

Cache size is not included on default Caffeine stats. Piggybacking on counter to record updates to estimated size.

Reference: https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/CaffeineStatsCounter.java

AnatolyPopov commented 1 year ago

@jeqo could you rebase this one?

jeqo commented 1 year ago

@AnatolyPopov, sure. PR rebased and updated to latest metrics. Take a look, thanks!