Skip to content

Commit

Permalink
Buckets in gce_api_request_duration_seconds metric
Browse files Browse the repository at this point in the history
Define Buckets in gce_api_request_duration_seconds metric to cover latencies from 5ms to 5 minutes+

The default buckets: `	DefBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10}`
defined in, github.com/prometheus/client_golang/prometheus/histogram.go
do not cover long running requests, e.g. backend service update takes 30-40 seconds.
  • Loading branch information
cezarygerard committed May 19, 2022
1 parent 37a3586 commit 71d261b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/composite/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ func registerAPIMetrics(attributes ...string) *apiCallMetrics {
metrics := &apiCallMetrics{
latency: prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Name: "gce_api_request_duration_seconds", // TODO: (shance) reconcile with cloudprovider
Help: "Latency of a GCE API call",
Name: "gce_api_request_duration_seconds", // TODO: (shance) reconcile with cloudprovider
Help: "Latency of a GCE API call",
Buckets: []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 20, 40, 80, 160, 320},
},
attributes,
),
Expand Down

0 comments on commit 71d261b

Please sign in to comment.