diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-06-05 11:31:18 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-06-05 11:31:18 +0300 |
commit | e96f9d00469050d3548ee45928b2a5b6733a3a7d (patch) | |
tree | 25dd18901d9e23e08c275ee6c896c06ae63dfe14 /app.go | |
parent | c877296b468e4a828da27f4fd47c3e17eb7e2e1d (diff) |
Use histograms instead of gagues
Removed test assertion for metric as histograms are not collectors
so we can't really test it. Left the test though as it's still valuable.
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -259,7 +259,7 @@ func (a *theApp) accessControlMiddleware(handler http.Handler) http.Handler { func (a *theApp) serveFileOrNotFoundHandler() http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { start := time.Now() - defer metrics.ServingTime.Set(time.Since(start).Seconds()) + defer metrics.ServingTime.Observe(time.Since(start).Seconds()) domain := request.GetDomain(r) fileServed := domain.ServeFileHTTP(w, r) |