@ThreadSafe public class PredefinedMetricTransformer extends Object
MetricDatum
.
See http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/
publishingMetrics.htmlAWSRequestMetrics
,
RequestMetricCollector
Constructor and Description |
---|
PredefinedMetricTransformer() |
Modifier and Type | Method and Description |
---|---|
protected List<MetricDatum> |
counterMetricOf(MetricType type,
Request<?> req,
Object resp,
boolean includesRequestType)
Returns a list of metric datum recorded for the specified counter metric
type; or an empty list if there is none.
|
protected List<MetricDatum> |
latencyMetricOf(MetricType metricType,
Request<?> req,
Object response,
boolean includesRequestType)
Returns all the latency metric data recorded for the specified metric
event type; or an empty list if there is none.
|
protected List<MetricDatum> |
latencyOfClientExecuteTime(Request<?> req,
Object response)
Returns a request type specific metrics for
AWSRequestMetrics.Field.ClientExecuteTime which is special in the sense that it
makes a more accurate measurement by taking the TimingInfo at the
root into account. |
protected List<MetricDatum> |
metricOfCount(AWSRequestMetrics.Field metricType,
Request<?> req,
Object resp) |
protected List<MetricDatum> |
metricOfRequestOrRetryCount(AWSRequestMetrics.Field metricType,
Request<?> req,
Object resp)
Returns a list with a single metric datum for the specified retry or
request count predefined metric; or an empty list if there is none.
|
List<MetricDatum> |
toMetricData(MetricType metricType,
Request<?> request,
Response<?> response)
Returns a non-null list of metric datum for the metrics collected for the
given request/response.
|
public List<MetricDatum> toMetricData(MetricType metricType, Request<?> request, Response<?> response)
metricType
- the request metric typeprotected List<MetricDatum> metricOfRequestOrRetryCount(AWSRequestMetrics.Field metricType, Request<?> req, Object resp)
metricType
- must be either AWSRequestMetrics.Field.RequestCount
or
AWSRequestMetrics.Field.RetryCount
; or else GIGO.protected List<MetricDatum> metricOfCount(AWSRequestMetrics.Field metricType, Request<?> req, Object resp)
protected List<MetricDatum> latencyMetricOf(MetricType metricType, Request<?> req, Object response, boolean includesRequestType)
includesRequestType
- true iff the "request" dimension is to be included;protected List<MetricDatum> latencyOfClientExecuteTime(Request<?> req, Object response)
AWSRequestMetrics.Field.ClientExecuteTime
which is special in the sense that it
makes a more accurate measurement by taking the TimingInfo
at the
root into account.protected List<MetricDatum> counterMetricOf(MetricType type, Request<?> req, Object resp, boolean includesRequestType)
includesRequestType
- true iff an additional metric datum is to be created that
includes the "request" dimensionCopyright © 2022. All rights reserved.