This commit is contained in:
lucio 2024-01-25 16:46:56 +01:00
parent 57d25b3ed3
commit 6dec0d7a6a
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public class RequestMetrics extends RequestHandler {
@Override
public void handleResponse(ResponseEvent e) {
String statusCode = Integer.toString(e.response().getStatus());
Metrics.globalRegistry.timer(HTTP_REQUEST_METRICS_NAME, "status", statusCode).record(Duration.ofMillis(System.currentTimeMillis() - startCallThreadLocal.get()));
Metrics.timer(HTTP_REQUEST_METRICS_NAME, "status", statusCode).record(Duration.ofMillis(System.currentTimeMillis() - startCallThreadLocal.get()));
startCallThreadLocal.remove();
log.debug("metrics for current call saved");
}