Skip to content

Commit

Permalink
Use a prometheus Histogram rather than a Summary for tracking apiserv…
Browse files Browse the repository at this point in the history
…er latency.
  • Loading branch information
a-robinson committed Mar 2, 2015
1 parent 76325ca commit 0d5fe5d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ var (
},
[]string{"handler", "verb", "resource", "code"},
)
requestLatencies = prometheus.NewSummaryVec(
prometheus.SummaryOpts{
requestLatencies = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Name: "apiserver_request_latencies",
Help: "Response latency summary in microseconds for each request handler and verb.",
Help: "Response latency distribution in microseconds for each request handler and verb.",
// Use buckets ranging from 125 ms to 8 seconds.
Buckets: prometheus.ExponentialBuckets(125000, 2.0, 7),
},
[]string{"handler", "verb"},
)
Expand Down

0 comments on commit 0d5fe5d

Please sign in to comment.