Skip to content

Commit ef1f8b0

Browse files
adopt native histograms
1 parent 5dfe321 commit ef1f8b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/internal/controller/metrics/metrics.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
package metrics
1818

1919
import (
20+
"time"
21+
2022
"github.com/prometheus/client_golang/prometheus"
2123
"github.com/prometheus/client_golang/prometheus/collectors"
2224
"sigs.k8s.io/controller-runtime/pkg/metrics"
@@ -60,6 +62,9 @@ var (
6062
Help: "Length of time per reconciliation per controller",
6163
Buckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0,
6264
1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40, 50, 60},
65+
NativeHistogramBucketFactor: 1.1,
66+
NativeHistogramMaxBucketNumber: 100,
67+
NativeHistogramMinResetDuration: 1 * time.Hour,
6368
}, []string{"controller"})
6469

6570
// WorkerCount is a prometheus metric which holds the number of

0 commit comments

Comments
 (0)