@Internal public class UnregisteredMetricsGroup extends Object implements MetricGroup
MetricGroup that does not register any metrics at the metrics registry and any
reporters.| Constructor and Description |
|---|
UnregisteredMetricsGroup() |
| Modifier and Type | Method and Description |
|---|---|
MetricGroup |
addGroup(String name)
Creates a new MetricGroup and adds it to this groups sub-groups.
|
MetricGroup |
addGroup(String key,
String value)
Creates a new key-value MetricGroup pair.
|
Counter |
counter(String name)
Creates and registers a new
Counter with Flink. |
<C extends Counter> |
counter(String name,
C counter)
Registers a
Counter with Flink. |
static CacheMetricGroup |
createCacheMetricGroup() |
static OperatorIOMetricGroup |
createOperatorIOMetricGroup() |
static OperatorMetricGroup |
createOperatorMetricGroup() |
static SourceReaderMetricGroup |
createSourceReaderMetricGroup() |
static SplitEnumeratorMetricGroup |
createSplitEnumeratorMetricGroup() |
<T,G extends Gauge<T>> |
gauge(String name,
G gauge)
Registers a new
Gauge with Flink. |
Map<String,String> |
getAllVariables()
Returns a map of all variables and their associated value, for example
{"<host>"="host-7", "<tm_id>"="taskmanager-2"}. |
String |
getMetricIdentifier(String metricName)
Returns the fully qualified metric name, for example
"host-7.taskmanager-2.window_word_count.my-mapper.metricName". |
String |
getMetricIdentifier(String metricName,
CharacterFilter filter)
Returns the fully qualified metric name, for example
"host-7.taskmanager-2.window_word_count.my-mapper.metricName". |
String[] |
getScopeComponents()
Gets the scope as an array of the scope components, for example
["host-7",
"taskmanager-2", "window_word_count", "my-mapper"]. |
<H extends Histogram> |
histogram(String name,
H histogram)
Registers a new
Histogram with Flink. |
<M extends Meter> |
meter(String name,
M meter)
Registers a new
Meter with Flink. |
public Counter counter(String name)
MetricGroupCounter with Flink.counter in interface MetricGroupname - name of the counterpublic <C extends Counter> C counter(String name, C counter)
MetricGroupCounter with Flink.counter in interface MetricGroupC - counter typename - name of the countercounter - counter to registerpublic <T,G extends Gauge<T>> G gauge(String name, G gauge)
MetricGroupGauge with Flink.gauge in interface MetricGroupT - return type of the gaugename - name of the gaugegauge - gauge to registerpublic <M extends Meter> M meter(String name, M meter)
MetricGroupMeter with Flink.meter in interface MetricGroupM - meter typename - name of the metermeter - meter to registerpublic <H extends Histogram> H histogram(String name, H histogram)
MetricGroupHistogram with Flink.histogram in interface MetricGroupH - histogram typename - name of the histogramhistogram - histogram to registerpublic MetricGroup addGroup(String name)
MetricGroupaddGroup in interface MetricGroupname - name of the grouppublic MetricGroup addGroup(String key, String value)
MetricGroupThe only difference between calling this method and group.addGroup(key).addGroup(value) is that MetricGroup.getAllVariables() of the value group
return an additional "<key>"="value" pair.
addGroup in interface MetricGroupkey - name of the first groupvalue - name of the second grouppublic String[] getScopeComponents()
MetricGroup["host-7",
"taskmanager-2", "window_word_count", "my-mapper"].getScopeComponents in interface MetricGroupMetricGroup.getMetricIdentifier(String),
MetricGroup.getMetricIdentifier(String, CharacterFilter)public Map<String,String> getAllVariables()
MetricGroup{"<host>"="host-7", "<tm_id>"="taskmanager-2"}.getAllVariables in interface MetricGrouppublic String getMetricIdentifier(String metricName)
MetricGroup"host-7.taskmanager-2.window_word_count.my-mapper.metricName".getMetricIdentifier in interface MetricGroupmetricName - metric namepublic String getMetricIdentifier(String metricName, CharacterFilter filter)
MetricGroup"host-7.taskmanager-2.window_word_count.my-mapper.metricName".getMetricIdentifier in interface MetricGroupmetricName - metric namefilter - character filter which is applied to the scope components if not null.public static OperatorMetricGroup createOperatorMetricGroup()
public static OperatorIOMetricGroup createOperatorIOMetricGroup()
public static SourceReaderMetricGroup createSourceReaderMetricGroup()
public static SplitEnumeratorMetricGroup createSplitEnumeratorMetricGroup()
public static CacheMetricGroup createCacheMetricGroup()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.