* Returns the most specific request metric collector, starting from the
* request level, then client level, then finally the AWS SDK level.
*/
private RequestMetricCollector requestMetricCollector(Request<?> req) {
AmazonWebServiceRequest origReq = req.getOriginalRequest();
RequestMetricCollector mc = origReq.getRequestMetricCollector();
if (mc != null) {
return mc;
}
mc = requestMetricCollector;
return mc == null ? AwsSdkMetrics.getRequestMetricCollector() : mc;