Class KafkaMetricsContext

java.lang.Object
org.apache.kafka.common.metrics.KafkaMetricsContext
All Implemented Interfaces:
MetricsContext

public class KafkaMetricsContextextends Object implements MetricsContext
An implementation of MetricsContext, it encapsulates required metrics context properties for Kafka services and clients
  • Constructor Details

    • KafkaMetricsContext

      public KafkaMetricsContext(String namespace)
      Create a MetricsContext with namespace, no service or client properties
      Parameters:
      namespace - value for _namespace key
    • KafkaMetricsContext

      public KafkaMetricsContext(String namespace, Map<String,?> contextLabels)
      Create a MetricsContext with namespace, service or client properties
      Parameters:
      namespace - value for _namespace key
      contextLabels - contextLabels additional entries to add to the context. values will be converted to string using Object.toString()
  • Method Details