[#280] Add put requests to duration metric

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
Marina Biryukova 2023-12-20 18:31:36 +03:00 committed by Alexey Vanin
parent f7da94f9a4
commit 94980059b7

View file

@ -94,10 +94,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 // Increment the prometheus http request response histogram with appropriate label
appMetrics.Statistic().RequestDurationsUpdate(reqInfo.API, durationSecs) appMetrics.Statistic().RequestDurationsUpdate(reqInfo.API, durationSecs)
}
appMetrics.Statistic().TotalInputBytesAdd(in.countBytes) appMetrics.Statistic().TotalInputBytesAdd(in.countBytes)
appMetrics.Statistic().TotalOutputBytesAdd(out.countBytes) appMetrics.Statistic().TotalOutputBytesAdd(out.countBytes)