Package org.apache.flink.runtime.metrics
Interface MetricRegistry
-
- All Known Implementing Classes:
MetricRegistryImpl
,NoOpMetricRegistry
public interface MetricRegistry
Interface for a metric registry.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addSpan(SpanBuilder spanBuilder)
Add and log aSpan
.char
getDelimiter()
Returns the global delimiter.default String
getMetricQueryServiceGatewayRpcAddress()
Returns the gateway of theMetricQueryService
or null, if none is started.int
getNumberReporters()
Returns the number of registered reporters.ScopeFormats
getScopeFormats()
Returns the scope formats.void
register(Metric metric, String metricName, AbstractMetricGroup group)
Registers a newMetric
with this registry.void
unregister(Metric metric, String metricName, AbstractMetricGroup group)
Un-registers the givenMetric
with this registry.
-
-
-
Method Detail
-
getDelimiter
char getDelimiter()
Returns the global delimiter.- Returns:
- global delimiter
-
getNumberReporters
int getNumberReporters()
Returns the number of registered reporters.
-
addSpan
void addSpan(SpanBuilder spanBuilder)
Add and log aSpan
.
-
register
void register(Metric metric, String metricName, AbstractMetricGroup group)
Registers a newMetric
with this registry.- Parameters:
metric
- the metric that was addedmetricName
- the name of the metricgroup
- the group that contains the metric
-
unregister
void unregister(Metric metric, String metricName, AbstractMetricGroup group)
Un-registers the givenMetric
with 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
@Nullable default String getMetricQueryServiceGatewayRpcAddress()
Returns the gateway of theMetricQueryService
or null, if none is started.- Returns:
- Gateway of the MetricQueryService or null, if none is started
-
-