public class MetricListener extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DELIMITER |
static String |
ROOT_METRIC_GROUP_NAME |
Constructor and Description |
---|
MetricListener() |
Modifier and Type | Method and Description |
---|---|
Counter |
getCounter(String... identifier)
Get registered
Counter with identifier relative to the root metric group. |
<T> Gauge<T> |
getGauge(String... identifier)
Get registered
Gauge with identifier relative to the root metric group. |
Histogram |
getHistogram(String... identifier)
Get registered
Histogram with identifier relative to the root metric group. |
Meter |
getMeter(String... identifier)
Get registered
Meter with identifier relative to the root metric group. |
<T extends Metric> |
getMetric(Class<T> metricType,
String... identifier)
Get registered
Metric with identifier relative to the root metric group. |
MetricGroup |
getMetricGroup()
Get the root metric group of this listener.
|
public static final String DELIMITER
public static final String ROOT_METRIC_GROUP_NAME
public MetricGroup getMetricGroup()
public <T extends Metric> T getMetric(Class<T> metricType, String... identifier)
Metric
with identifier relative to the root metric group.
For example, identifier of metric "myMetric" registered in group "myGroup" under root metric group can be reached by identifier ("myGroup", "myMetric")
identifier
- identifier relative to the root metric grouppublic Meter getMeter(String... identifier)
Meter
with identifier relative to the root metric group.identifier
- identifier relative to the root metric grouppublic Counter getCounter(String... identifier)
Counter
with identifier relative to the root metric group.identifier
- identifier relative to the root metric grouppublic Histogram getHistogram(String... identifier)
Histogram
with identifier relative to the root metric group.identifier
- identifier relative to the root metric groupCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.