Merge branch v2.1 into v2.2

This commit is contained in:
Fernandez Ludovic 2020-03-19 17:53:34 +01:00
commit f54b8d8847
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 {