Use histogram metrics for Scores in Bazarr Exporter #239
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Details
What steps did you take and what happened:
While working on some other things, I noticed this -- right now we're exporting counts of episodes/movies by
score
-- like other *arrs,score
is a percentage indication of certainty, and at least in bazarr, it has 2 decimals of precision. This means cardinality for this label could theoretically hit 10k.Graphing this metric is likely to be done via pie chart / bar distribution, which means a quantile a) bounds cardinality to bucket count, and b) is actually a bit better representation of this type of value anyway.
Additional Information
Prometheus Quantiles: https://prometheus.io/docs/practices/histograms/
MustNewConstHistogram: https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#MustNewConstHistogram
Example Usage: https://github.com/prometheus/client_golang/blob/main/prometheus/examples_test.go#L440-L446 (note: bucket labels are an inclusive upper bound)
Reference
exportarr/internal/arr/collector/bazarr.go
Lines 335 to 348 in e42774b
The text was updated successfully, but these errors were encountered: