Merge branch v2.1 into v2.2

This commit is contained in:
Fernandez Ludovic
2020-03-19 17:53:34 +01:00
4 changed files with 19 additions and 31 deletions

View File

@@ -103,11 +103,9 @@ func (m *metricsMiddleware) ServeHTTP(rw http.ResponseWriter, req *http.Request)
labels = append(labels, "code", strconv.Itoa(recorder.getCode()))
histograms := m.reqDurationHistogram.With(labels...)
histograms.StartAt(start)
histograms.ObserveFromStart(start)
m.reqsCounter.With(labels...).Add(1)
histograms.ObserveDuration()
}
func getRequestProtocol(req *http.Request) string {