diff --git a/api/middleware/metrics.go b/api/middleware/metrics.go index a0b860c8..1370c3bc 100644 --- a/api/middleware/metrics.go +++ b/api/middleware/metrics.go @@ -95,10 +95,8 @@ func stats(f http.HandlerFunc, resolveCID cidResolveFunc, appMetrics *metrics.Ap } } - if r.Method == http.MethodGet { - // Increment the prometheus http request response histogram with appropriate label - appMetrics.Statistic().RequestDurationsUpdate(reqInfo.API, durationSecs) - } + // Increment the prometheus http request response histogram with appropriate label + appMetrics.Statistic().RequestDurationsUpdate(reqInfo.API, durationSecs) appMetrics.Statistic().TotalInputBytesAdd(in.countBytes) appMetrics.Statistic().TotalOutputBytesAdd(out.countBytes)