Add Object Version count histogram (#16739)

This commit is contained in:
Klaus Post
2023-03-10 08:53:59 -08:00
committed by GitHub
parent 9800760cb3
commit d85da9236e
10 changed files with 363 additions and 37 deletions
+12
View File
@@ -441,6 +441,18 @@ func bucketUsageMetricsPrometheus(ch chan<- prometheus.Metric) {
k,
)
}
for k, v := range usageInfo.ObjectVersionsHistogram {
ch <- prometheus.MustNewConstMetric(
prometheus.NewDesc(
prometheus.BuildFQName(bucketNamespace, "objects", "histogram"),
"Total number of versions of objects in a bucket",
[]string{"bucket", "object_versions"}, nil),
prometheus.GaugeValue,
float64(v),
bucket,
k,
)
}
}
}