@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 SinkWriterMetricGroup |
createSinkWriterMetricGroup() |
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)
MetricGroup
Counter
with Flink.counter
in interface MetricGroup
name
- name of the counterpublic <C extends Counter> C counter(String name, C counter)
MetricGroup
Counter
with Flink.counter
in interface MetricGroup
C
- counter typename
- name of the countercounter
- counter to registerpublic <T,G extends Gauge<T>> G gauge(String name, G gauge)
MetricGroup
Gauge
with Flink.gauge
in interface MetricGroup
T
- return type of the gaugename
- name of the gaugegauge
- gauge to registerpublic <M extends Meter> M meter(String name, M meter)
MetricGroup
Meter
with Flink.meter
in interface MetricGroup
M
- meter typename
- name of the metermeter
- meter to registerpublic <H extends Histogram> H histogram(String name, H histogram)
MetricGroup
Histogram
with Flink.histogram
in interface MetricGroup
H
- histogram typename
- name of the histogramhistogram
- histogram to registerpublic MetricGroup addGroup(String name)
MetricGroup
addGroup
in interface MetricGroup
name
- name of the grouppublic MetricGroup addGroup(String key, String value)
MetricGroup
The 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 MetricGroup
key
- 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 MetricGroup
MetricGroup.getMetricIdentifier(String)
,
MetricGroup.getMetricIdentifier(String, CharacterFilter)
public Map<String,String> getAllVariables()
MetricGroup
{"<host>"="host-7", "<tm_id>"="taskmanager-2"}
.getAllVariables
in interface MetricGroup
public String getMetricIdentifier(String metricName)
MetricGroup
"host-7.taskmanager-2.window_word_count.my-mapper.metricName"
.getMetricIdentifier
in interface MetricGroup
metricName
- metric namepublic String getMetricIdentifier(String metricName, CharacterFilter filter)
MetricGroup
"host-7.taskmanager-2.window_word_count.my-mapper.metricName"
.getMetricIdentifier
in interface MetricGroup
metricName
- 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()
public static SinkWriterMetricGroup createSinkWriterMetricGroup()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.