/** * Convenient method to end the client execution without logging the awsRequestMetrics. */ private void endClientExecution(AWSRequestMetrics awsRequestMetrics, RequestConfig requestConfig, Request<?> request, Response<?> response) { if (request != null) { awsRequestMetrics.endEvent(AWSRequestMetrics.Field.ClientExecuteTime); awsRequestMetrics.getTimingInfo().endTiming(); RequestMetricCollector metricCollector = findRequestMetricCollector(requestConfig); metricCollector.collectMetrics(request, response); awsRequestMetrics.log(); } }
/** * Returns true if request metric collection is enabled at the service * client or AWS SDK level request; false otherwise. */ private boolean isRMCEnabledAtClientOrSdkLevel() { RequestMetricCollector c = requestMetricCollector(); return c != null && c.isEnabled(); }
/** * Returns true if request metric collection is enabled at the service client or AWS SDK level * request; false otherwise. */ private boolean isRMCEnabledAtClientOrSdkLevel() { RequestMetricCollector collector = requestMetricCollector(); return collector != null && collector.isEnabled(); }
/** * Common routine to end a client AWS request/response execution and collect * the request metrics. Caller of this routine is responsible for starting * the event for {@link Field#ClientExecuteTime} and call this method * in a try-finally block. * * @param loggingAwsRequestMetrics deprecated and ignored */ protected final void endClientExecution( AWSRequestMetrics awsRequestMetrics, Request<?> request, Response<?> response, @Deprecated boolean loggingAwsRequestMetrics) { if (request != null) { awsRequestMetrics.endEvent(Field.ClientExecuteTime); awsRequestMetrics.getTimingInfo().endTiming(); RequestMetricCollector c = findRequestMetricCollector( request.getOriginalRequest().getRequestMetricCollector()); c.collectMetrics(request, response); awsRequestMetrics.log(); } }
/** * Returns true if request metric collection is applicable to the given * request; false otherwise. */ protected final boolean isRequestMetricsEnabled(AmazonWebServiceRequest req) { RequestMetricCollector c = req.getRequestMetricCollector(); // request level collector if (c != null && c.isEnabled()) { return true; } return isRMCEnabledAtClientOrSdkLevel(); }
/** * Convenient method to end the client execution without logging the awsRequestMetrics. */ private void endClientExecution(AWSRequestMetrics awsRequestMetrics, RequestConfig requestConfig, Request<?> request, Response<?> response) { if (request != null) { awsRequestMetrics.endEvent(AWSRequestMetrics.Field.ClientExecuteTime); awsRequestMetrics.getTimingInfo().endTiming(); RequestMetricCollector metricCollector = findRequestMetricCollector(requestConfig); metricCollector.collectMetrics(request, response); awsRequestMetrics.log(); } }
private boolean hasRequestMetricsCollector(RequestConfig requestConfig) { return requestConfig.getRequestMetricsCollector() != null && requestConfig.getRequestMetricsCollector().isEnabled(); }
/** * Common routine to end a client AWS request/response execution and collect * the request metrics. Caller of this routine is responsible for starting * the event for {@link Field#ClientExecuteTime} and call this method in a * try-finally block. * * @param loggingAwsRequestMetrics true to LOG the awsRequestMetrics; false * otherwise. * @deprecated metrics is deprecated */ @Deprecated protected final void endClientExecution( AWSRequestMetrics awsRequestMetrics, Request<?> request, Response<?> response, boolean loggingAwsRequestMetrics) { if (request != null) { awsRequestMetrics.endEvent(Field.ClientExecuteTime); awsRequestMetrics.getTimingInfo().endTiming(); final RequestMetricCollector c = findRequestMetricCollector(request); c.collectMetrics(request, response); } if (loggingAwsRequestMetrics) { awsRequestMetrics.log(); } }
/** * Returns true if request metric collection is enabled at the service client or AWS SDK level * request; false otherwise. */ private boolean isRMCEnabledAtClientOrSdkLevel() { RequestMetricCollector collector = requestMetricCollector(); return collector != null && collector.isEnabled(); }
/** * Common routine to end a client AWS request/response execution and collect * the request metrics. Caller of this routine is responsible for starting * the event for {@link Field#ClientExecuteTime} and call this method * in a try-finally block. * * @param loggingAwsRequestMetrics deprecated and ignored */ protected final void endClientExecution( AWSRequestMetrics awsRequestMetrics, Request<?> request, Response<?> response, @Deprecated boolean loggingAwsRequestMetrics) { if (request != null) { awsRequestMetrics.endEvent(Field.ClientExecuteTime); awsRequestMetrics.getTimingInfo().endTiming(); RequestMetricCollector c = findRequestMetricCollector( request.getOriginalRequest().getRequestMetricCollector()); c.collectMetrics(request, response); awsRequestMetrics.log(); } }
/** * Returns true if request metric collection is enabled at the service * client or AWS SDK level request; false otherwise. * * @deprecated metrics is deprecated */ @Deprecated private boolean isRMCEnabledAtClientOrSdkLevel() { final RequestMetricCollector c = requestMetricCollector(); return c != null && c.isEnabled(); }
/** * Common routine to end a client AWS request/response execution and collect * the request metrics. Caller of this routine is responsible for starting * the event for {@link Field#ClientExecuteTime} and call this method in a * try-finally block. * * @param loggingAwsRequestMetrics true to LOG the awsRequestMetrics; false * otherwise. * @deprecated metrics is deprecated */ @Deprecated protected final void endClientExecution( AWSRequestMetrics awsRequestMetrics, Request<?> request, Response<?> response, boolean loggingAwsRequestMetrics) { if (request != null) { awsRequestMetrics.endEvent(Field.ClientExecuteTime); awsRequestMetrics.getTimingInfo().endTiming(); final RequestMetricCollector c = findRequestMetricCollector(request); c.collectMetrics(request, response); } if (loggingAwsRequestMetrics) { awsRequestMetrics.log(); } }
/** * Returns true if request metric collection is enabled at the service * client or AWS SDK level request; false otherwise. */ private boolean isRMCEnabledAtClientOrSdkLevel() { RequestMetricCollector c = requestMetricCollector(); return c != null && c.isEnabled(); }
/** * Common routine to end a client AWS request/response execution and collect * the request metrics. Caller of this routine is responsible for starting * the event for {@link Field#ClientExecuteTime} and call this method in a * try-finally block. * * @param loggingAwsRequestMetrics true to LOG the awsRequestMetrics; false * otherwise. * @deprecated metrics is deprecated */ @Deprecated protected final void endClientExecution( AWSRequestMetrics awsRequestMetrics, Request<?> request, Response<?> response, boolean loggingAwsRequestMetrics) { if (request != null) { awsRequestMetrics.endEvent(Field.ClientExecuteTime); awsRequestMetrics.getTimingInfo().endTiming(); final RequestMetricCollector c = findRequestMetricCollector(request); c.collectMetrics(request, response); } if (loggingAwsRequestMetrics) { awsRequestMetrics.log(); } }
/** * Returns true if request metric collection is applicable to the given * request; false otherwise. */ protected final boolean isRequestMetricsEnabled(AmazonWebServiceRequest req) { RequestMetricCollector c = req.getRequestMetricCollector(); // request level collector if (c != null && c.isEnabled()) { return true; } return isRMCEnabledAtClientOrSdkLevel(); }
/** * Convenient method to end the client execution without logging the awsRequestMetrics. */ private void endClientExecution(AWSRequestMetrics awsRequestMetrics, RequestConfig requestConfig, Request<?> request, Response<?> response) { if (request != null) { awsRequestMetrics.endEvent(AWSRequestMetrics.Field.ClientExecuteTime); awsRequestMetrics.getTimingInfo().endTiming(); RequestMetricCollector metricCollector = findRequestMetricCollector(requestConfig); metricCollector.collectMetrics(request, response); awsRequestMetrics.log(); } }
private boolean hasRequestMetricsCollector(RequestConfig requestConfig) { return requestConfig.getRequestMetricsCollector() != null && requestConfig.getRequestMetricsCollector().isEnabled(); }
/** * Common routine to end a client AWS request/response execution and collect * the request metrics. Caller of this routine is responsible for starting * the event for {@link Field#ClientExecuteTime} and call this method * in a try-finally block. * * @param loggingAwsRequestMetrics deprecated and ignored */ protected final void endClientExecution( AWSRequestMetrics awsRequestMetrics, Request<?> request, Response<?> response, @Deprecated boolean loggingAwsRequestMetrics) { if (request != null) { awsRequestMetrics.endEvent(Field.ClientExecuteTime); awsRequestMetrics.getTimingInfo().endTiming(); RequestMetricCollector c = findRequestMetricCollector( request.getOriginalRequest().getRequestMetricCollector()); c.collectMetrics(request, response); awsRequestMetrics.log(); } }
/** * Returns true if request metric collection is applicable to the given * request; false otherwise. * * @deprecated metrics is deprecated */ @Deprecated protected final boolean isRequestMetricsEnabled(final AmazonWebServiceRequest req) { final RequestMetricCollector c = req.getRequestMetricCollector(); // request // level // collector if (c != null && c.isEnabled()) { return true; } return isRMCEnabledAtClientOrSdkLevel(); }
/** * Returns true if request metric collection is enabled at the service client or AWS SDK level * request; false otherwise. */ private boolean isRMCEnabledAtClientOrSdkLevel() { RequestMetricCollector collector = requestMetricCollector(); return collector != null && collector.isEnabled(); }