[#280] Add put requests to duration metric #285

Merged
alexvanin merged 1 commit from mbiryukova/frostfs-s3-gw:bugfix/put_reqs_to_duration_metric into master 2023-12-25 08:56:33 +00:00

View file

@ -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 // Increment the prometheus http request response histogram with appropriate label
dkirillov marked this conversation as resolved Outdated

Maybe we can drop condition at all?
cc @alexvanin

Maybe we can drop condition at all? cc @alexvanin

Let's do it. Don't see much value in it.

Let's do it. Don't see much value in it.
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)