@NotThreadSafe public class AWSRequestMetricsFullSupport extends AWSRequestMetrics
AWSRequestMetrics
, which is intended to be a minimal
support of AWS SDK request metrics, this class is the full support of AWS SDK
request metrics including features such as properties and sub-events.
This class is instantiated instead of AWSRequestMetrics
when request
metric collection is required during a particular service request/response
cycle.
AWSRequestMetrics.Field
Constructor and Description |
---|
AWSRequestMetricsFullSupport()
This constructor should be used in the case when AWS SDK metrics
collector is enabled.
|
Modifier and Type | Method and Description |
---|---|
void |
addProperty(MetricType f,
Object value) |
void |
addProperty(String propertyName,
Object value)
Add a property.
|
void |
endEvent(MetricType f) |
void |
endEvent(String eventName)
End an event which was previously started.
|
List<Object> |
getProperty(MetricType f) |
List<Object> |
getProperty(String propertyName) |
void |
incrementCounter(MetricType f) |
void |
incrementCounter(String event)
Add 1 to an existing count for a given event.
|
boolean |
isEnabled()
Always returns true.
|
void |
log() |
void |
setCounter(MetricType f,
long count) |
void |
setCounter(String counterName,
long count) |
void |
startEvent(MetricType f) |
void |
startEvent(String eventName)
Start an event which will be timed.
|
addPropertyWith, addPropertyWith, getTimingInfo, incrementCounterWith, incrementCounterWith, withCounter, withCounter
public AWSRequestMetricsFullSupport()
AWSRequestMetricsFullSupport
public void startEvent(String eventName)
RequestMetricCollector
is in use either at the request, web service
client, or AWS SDK level.startEvent
in class AWSRequestMetrics
eventName
- - The name of the event to startAwsSdkMetrics
public void startEvent(MetricType f)
startEvent
in class AWSRequestMetrics
public void endEvent(String eventName)
endEvent
in class AWSRequestMetrics
eventName
- - The name of the event to startpublic void endEvent(MetricType f)
endEvent
in class AWSRequestMetrics
public void incrementCounter(String event)
RequestMetricCollector
is in use either at the request, web service
client, or AWS SDK level.incrementCounter
in class AWSRequestMetrics
event
- - The name of the event to countpublic void incrementCounter(MetricType f)
incrementCounter
in class AWSRequestMetrics
public void setCounter(String counterName, long count)
setCounter
in class AWSRequestMetrics
public void setCounter(MetricType f, long count)
setCounter
in class AWSRequestMetrics
public void addProperty(String propertyName, Object value)
RequestMetricCollector
is in use either at the request, web service
client, or AWS SDK level.addProperty
in class AWSRequestMetrics
propertyName
- The name of the propertyvalue
- The property valuepublic void addProperty(MetricType f, Object value)
addProperty
in class AWSRequestMetrics
public void log()
log
in class AWSRequestMetrics
public List<Object> getProperty(String propertyName)
getProperty
in class AWSRequestMetrics
public List<Object> getProperty(MetricType f)
getProperty
in class AWSRequestMetrics
public final boolean isEnabled()
isEnabled
in class AWSRequestMetrics
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.