public void trackAsyncRequestResponseHandler(final AsyncRequestResponseHandler asyncRequestResponseHandler) {
    Gauge<Integer> totalRequestQueueSize = asyncRequestResponseHandler::getRequestQueueSize;
    metricRegistry.register(MetricRegistry.name(AsyncRequestResponseHandler.class, "TotalRequestQueueSize"),
        totalRequestQueueSize);

    Gauge<Integer> totalResponseSetSize = asyncRequestResponseHandler::getResponseSetSize;
    metricRegistry.register(MetricRegistry.name(AsyncRequestResponseHandler.class, "TotalResponseSetSize"),
        totalResponseSetSize);

    Gauge<Integer> asyncHandlerWorkersAlive = asyncRequestResponseHandler::getWorkersAlive;
    metricRegistry.register(MetricRegistry.name(AsyncRequestResponseHandler.class, "AsyncHandlerWorkersAlive"),
        asyncHandlerWorkersAlive);
  }
Periodically reports key metrics of the {@code asyncRequestResponseHandler}.
@param asyncRequestResponseHandler the {@link AsyncRequestResponseHandler} whose key metrics have to be tracked.
ambry-rest/src/main/java/com/github/ambry/rest/AsyncRequestResponseHandlerFactory.java