Package software.amazon.awssdk.metrics
Interface MetricCollector
-
- All Known Implementing Classes:
DefaultMetricCollector
,NoOpMetricCollector
@NotThreadSafe public interface MetricCollector
Used to collect metrics reported by the SDK.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description MetricCollection
collect()
Return the collected metrics.static MetricCollector
create(String name)
MetricCollector
createChild(String name)
Create a child of this metric collector.String
name()
<T> void
reportMetric(SdkMetric<T> metric, T data)
Report a metric.
-
-
-
Method Detail
-
name
String name()
- Returns:
- The name of this collector.
-
reportMetric
<T> void reportMetric(SdkMetric<T> metric, T data)
Report a metric.
-
createChild
MetricCollector createChild(String name)
Create a child of this metric collector.- Parameters:
name
- The name of the child collector.- Returns:
- The child collector.
-
collect
MetricCollection collect()
Return the collected metrics.Calling
collect()
prevents further invocations ofreportMetric(SdkMetric, Object)
.- Returns:
- The collected metrics.
-
create
static MetricCollector create(String name)
-
-