Merge branch v2.1 into v2.2
This commit is contained in:
commit
f54b8d8847
4 changed files with 19 additions and 31 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue