Skip to content

Commit

Permalink
Use histogram, not summary, in WAI
Browse files Browse the repository at this point in the history
https://prometheus.io/docs/practices/histograms/ has a full discussion,
but the gist is that histograms can be aggregated across processes whereas
summaries cannot.

This makes histograms more useful in environments where there is more than one
process handling web requests, which is perhaps the more common case.
  • Loading branch information
jml committed Jul 2, 2017
1 parent 6e36765 commit f2be0f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ instance Default.Default PrometheusSettings where
{-# NOINLINE requestLatency #-}
-- XXX: https://prometheus.io/docs/practices/naming/ says this should be
-- _seconds, not _microseconds.
requestLatency :: Prom.Metric (Prom.Vector Prom.Label3 Prom.Summary)
requestLatency :: Prom.Metric (Prom.Vector Prom.Label3 Prom.Histogram)
requestLatency = Prom.unsafeRegisterIO $ Prom.vector ("handler", "method", "status_code")
$ Prom.summary info Prom.defaultQuantiles
$ Prom.histogram info Prom.defaultBuckets
where info = Prom.Info "http_request_duration_seconds"
"The HTTP request latencies in seconds."

Expand Down

0 comments on commit f2be0f3

Please sign in to comment.