Package org.apache.kafka.common.metrics
Interface MetricsContext
-
- All Known Implementing Classes:
KafkaMetricsContext
@Evolving public interface MetricsContext
MetricsContext encapsulates additional contextLabels about metrics exposed via aMetricsReporter
The contextLabels map provides following information: - a_namespace field indicating the component exposing metrics e.g. kafka.server, kafka.consumer
JmxReporter
uses this as prefix for mbean names - for clients and streams libraries: any freeform fields passed in via client properties in the form of `metrics.context.= - for kafka brokers: kafka.broker.id, kafka.cluster.id - for connect workers: connect.kafka.cluster.id, connect.group.id
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,String>
contextLabels()
Returns the labels for this metrics context.
-
-
-
Field Detail
-
NAMESPACE
static final String NAMESPACE
- See Also:
- Constant Field Values
-
-