public class FlinkMetricGroup extends Object implements MetricGroup
MetricGroup which wraps a Flink's MetricGroup and
register all metrics into Flink's metric system.| Constructor and Description |
|---|
FlinkMetricGroup(org.apache.flink.metrics.MetricGroup wrapped,
String groupName,
Map<String,String> variables) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the metric group and release related resources.
|
Counter |
counter(String name)
Creates and registers a new
Counter with Paimon. |
<T> Gauge<T> |
gauge(String name,
Gauge<T> gauge)
Registers a new
Gauge with Paimon. |
Map<String,String> |
getAllVariables()
Returns a map of all variables and their associated value.
|
String |
getGroupName()
Returns the name for this group, meaning what kind of entity it represents, for example
"commit".
|
Map<String,Metric> |
getMetrics()
Returns all the metrics the group carries.
|
Histogram |
histogram(String name,
int windowSize)
Registers a new
Histogram with Paimon. |
public Counter counter(String name)
MetricGroupCounter with Paimon.counter in interface MetricGroupname - name of the counterpublic <T> Gauge<T> gauge(String name, Gauge<T> gauge)
MetricGroupGauge with Paimon.gauge in interface MetricGroupT - return type of the gaugename - name of the gaugegauge - gauge to registerpublic Histogram histogram(String name, int windowSize)
MetricGroupHistogram with Paimon.histogram in interface MetricGroupname - name of the histogramwindowSize - number of records this histogram keepspublic Map<String,String> getAllVariables()
MetricGroupgetAllVariables in interface MetricGrouppublic String getGroupName()
MetricGroupgetGroupName in interface MetricGrouppublic Map<String,Metric> getMetrics()
MetricGroupgetMetrics in interface MetricGrouppublic void close()
MetricGroupclose in interface MetricGroupCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.