Add native histogram support for histogram metrics (#9971)

Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>
This commit is contained in:
Sebastian Rabenhorst 2024-08-23 18:32:48 +02:00 committed by GitHub
parent 1ea376a0ee
commit ffee96c58c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 128 additions and 38 deletions

View file

@ -83,6 +83,9 @@ func TestCollector(t *testing.T) {
prometheus.ExponentialBuckets(10, 10, 7),
}
bucketFactor := 1.1
maxBuckets := uint32(100)
cases := []struct {
name string
data []string
@ -594,7 +597,7 @@ func TestCollector(t *testing.T) {
t.Run(c.name, func(t *testing.T) {
registry := prometheus.NewPedanticRegistry()
sc, err := NewSocketCollector("pod", "default", "ingress", true, c.useStatusClasses, buckets, c.excludeMetrics)
sc, err := NewSocketCollector("pod", "default", "ingress", true, c.useStatusClasses, buckets, bucketFactor, maxBuckets, c.excludeMetrics)
if err != nil {
t.Errorf("%v: unexpected error creating new SocketCollector: %v", c.name, err)
}