Closed kwapik closed 9 months ago
The recent changes involve enhancing the distributed cache metrics by introducing two new gauge metrics: one for the length of cache partitions and another for the length of backup cache partitions. These metrics are added to the DistCacheMetrics
struct and are calculated within the DistCache
type's scrapeMetrics
method. Additionally, corresponding constants are defined in the metrics schema.
File(s) | Change Summary |
---|---|
pkg/dist-cache/dist-cache-metrics.go , pkg/dist-cache/dist-cache.go |
Added PartitionsLength and BackupPartitionsLength metrics to DistCacheMetrics and updated scrapeMetrics to calculate these metrics. |
pkg/metrics/schema.go |
Introduced new constants for cache partition length metrics. |
🐇 In the realm of cache, a change took flight,
Metrics for partitions, now in plain sight.
Lengths counted with care, in backup and main,
CodeRabbit hopped joyfully, for clarity's gain.
🌟
Description of change
This can be used to track number of keys and their backups in Olric.
Checklist
Summary by CodeRabbit
New Features
Refactor