Package org.apache.flink.runtime.metrics
Interface MetricRegistry
- All Known Implementing Classes:
MetricRegistryImpl,NoOpMetricRegistry
public interface MetricRegistry
Interface for a metric registry.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSpan(org.apache.flink.traces.SpanBuilder spanBuilder) Add and log aSpan.charReturns the global delimiter.default StringReturns the gateway of theMetricQueryServiceor null, if none is started.intReturns the number of registered reporters.Returns the scope formats.voidregister(org.apache.flink.metrics.Metric metric, String metricName, AbstractMetricGroup group) Registers a newMetricwith this registry.voidunregister(org.apache.flink.metrics.Metric metric, String metricName, AbstractMetricGroup group) Un-registers the givenMetricwith this registry.
-
Method Details
-
getDelimiter
char getDelimiter()Returns the global delimiter.- Returns:
- global delimiter
-
getNumberReporters
int getNumberReporters()Returns the number of registered reporters. -
addSpan
void addSpan(org.apache.flink.traces.SpanBuilder spanBuilder) Add and log aSpan. -
register
Registers a newMetricwith this registry.- Parameters:
metric- the metric that was addedmetricName- the name of the metricgroup- the group that contains the metric
-
unregister
void unregister(org.apache.flink.metrics.Metric metric, String metricName, AbstractMetricGroup group) Un-registers the givenMetricwith this registry.- Parameters:
metric- the metric that should be removedmetricName- the name of the metricgroup- the group that contains the metric
-
getScopeFormats
ScopeFormats getScopeFormats()Returns the scope formats.- Returns:
- scope formats
-
getMetricQueryServiceGatewayRpcAddress
Returns the gateway of theMetricQueryServiceor null, if none is started.- Returns:
- Gateway of the MetricQueryService or null, if none is started
-