Add more precise rest_client_request_latency_seconds histogram buckets
@@ -42,7 +42,10 @@ var (
prometheus.HistogramOpts{
Name: "rest_client_request_latency_seconds",
Help: "Request latency in seconds. Broken down by verb and URL.",
- Buckets: prometheus.ExponentialBuckets(0.001, 2, 10),
+ // Buckets based on Kubernetes apiserver_request_duration_seconds.
+ // See https://github.com/kubernetes/kubernetes/pull/73638 for the discussion.
+ Buckets: []float64{0.005, 0.025, 0.05, 0.1, 0.2, 0.4, 0.6, 0.8, 1.0, 1.25, 1.5, 2, 3,
+ 4, 5, 6, 8, 10, 15, 20, 30, 45, 60},
},
[]string{"verb", "url"},
)
