mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 04:08:29 +01:00
Change metric type to Histogram, from Summary
This provides the ability to aggregate results in Prometheus, allowing metrics such as “average time per handler executed”. Summaries do not provide this facility, and since their use-case for other views on Prometheus is similar on `stackage-server`’s use-cases, it has been completely changed to Histograms.
This commit is contained in:
parent
296c284ccb
commit
d7789b4380
@ -52,16 +52,16 @@ track name inner = do
|
||||
return result
|
||||
where
|
||||
{-# NOINLINE duration #-}
|
||||
duration :: P.Metric (P.Vector P.Label1 P.Summary)
|
||||
duration :: P.Metric (P.Vector P.Label1 P.Histogram)
|
||||
duration =
|
||||
P.unsafeRegisterIO
|
||||
(P.vector
|
||||
"fn"
|
||||
(P.summary
|
||||
(P.histogram
|
||||
(P.Info
|
||||
"stackage_server_fn"
|
||||
"Stackage Server function call (duration in microseconds).")
|
||||
P.defaultQuantiles))
|
||||
P.defaultBuckets))
|
||||
|
||||
dateDiff :: UTCTime -- ^ now
|
||||
-> Day -- ^ target
|
||||
|
||||
Loading…
Reference in New Issue
Block a user