Fix issue with provider metrics

https://github.com/openfaas/faas-provider/pull/66

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2022-08-17 20:33:58 +01:00
parent 6dbc33d045
commit 9564e64980
5 changed files with 14 additions and 11 deletions

View File

@ -53,7 +53,7 @@ func (hm *httpMetrics) InstrumentHandler(next http.Handler, pathOverride string)
defer func() {
hm.RequestsTotal.With(
prometheus.Labels{"code": strconv.Itoa(ww.StatusCode),
prometheus.Labels{"code": strconv.Itoa(ww.Status()),
"method": r.Method,
"path": path,
}).
@ -62,7 +62,7 @@ func (hm *httpMetrics) InstrumentHandler(next http.Handler, pathOverride string)
defer func() {
hm.RequestDurationHistogram.With(
prometheus.Labels{"code": strconv.Itoa(ww.StatusCode),
prometheus.Labels{"code": strconv.Itoa(ww.Status()),
"method": r.Method,
"path": path,
}).