logical_disk: deprecate cumulative avg_*_requests_queued gauges (#2563)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2026-10-09 08:56:47 +02:00
committed by GitHub
co-authored by Claude Opus 5.5
parent ee4c8ea0fe
commit c7fa244d0e
5 changed files with 89 additions and 22 deletions
+22
View File
@@ -256,6 +256,28 @@ func RequireFixtureMetric(t *testing.T, families map[string]*dto.MetricFamily, c
return nil
}
// MetricValuesByLabel returns the gauge or counter values of metricName,
// keyed by the value of the label labelName.
func MetricValuesByLabel(families map[string]*dto.MetricFamily, metricName, labelName string) map[string]float64 {
values := make(map[string]float64)
for _, metric := range families[metricName].GetMetric() {
for _, label := range metric.GetLabel() {
if label.GetName() != labelName {
continue
}
if metric.GetCounter() != nil {
values[label.GetValue()] = metric.GetCounter().GetValue()
} else {
values[label.GetValue()] = metric.GetGauge().GetValue()
}
}
}
return values
}
func noDataOnly(err error) bool {
if joined, ok := err.(interface{ Unwrap() []error }); ok {
for _, cause := range joined.Unwrap() {