Skip to content

Commit

Permalink
Merge pull request #3 from christopherzli/main
Browse files Browse the repository at this point in the history
change query range buckets align with SLO
  • Loading branch information
christopherzli committed Apr 6, 2023
2 parents 6a22468 + 3ff7d5e commit 271ad0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/cortex/querier/queryrange/instrumentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const DAY = 24 * time.Hour
const queryRangeBucket = "query_range_bucket"
const invalidDurationBucket = "Invalid"

var queryRangeBuckets = []float64{.005, .01, .05, .1, .25, .5, 1, 3, 5, 10, 30, 60, 120}

// InstrumentMiddleware can be inserted into the middleware chain to expose timing information.
func InstrumentMiddleware(name string, metrics *InstrumentMiddlewareMetrics, log log.Logger) Middleware {

Expand Down Expand Up @@ -82,7 +84,7 @@ func NewInstrumentMiddlewareMetrics(registerer prometheus.Registerer) *Instrumen
Namespace: "cortex",
Name: "frontend_query_range_duration_seconds",
Help: "Total time spent in seconds doing query range requests.",
Buckets: prometheus.DefBuckets,
Buckets: queryRangeBuckets,
}, []string{"method", "status_code", queryRangeBucket}),
}
}
Expand Down

0 comments on commit 271ad0e

Please sign in to comment.