Skip to content

Commit

Permalink
feat(backend): use fewer histogram buckets for request latency
Browse files Browse the repository at this point in the history
Default buckets cover up to 10 seconds, which is unnecessarily wide
  • Loading branch information
carlpett committed Sep 25, 2020
1 parent 651dd6f commit 6b51191
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/karma/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ var (

reqDuration = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Name: "http_request_duration_seconds",
Help: "HTTP request latencies in seconds.",
Name: "http_request_duration_seconds",
Help: "HTTP request latencies in seconds.",
Buckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5}, // prometheus.DefBuckets, but cut off at 0.5 instead of 10 sec
}, labels,
)

Expand Down

0 comments on commit 6b51191

Please sign in to comment.