Skip to content

turn/kafka-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kafka-metrics

This is a utility package for managing Kafka client metrics.

Kafka uses Yammer Metrics that it places in the default registry. The metrics are named in a standardized fashion. This utility provides a listener interface that allows the following:

  • notification of added/removed Kafka metrics
  • parsing Kafka's naming scheme to extract the metric name and tags
  • ease of exporting to another registry
  • ease of exporting to TSDB

Usage

Implement KafkaMetricsListener, and pass an instance of that to KafkaClientMetricSet's constructor:

class MyKafkaListener implements KafkaMetricsListener {
    void onKafkaMetricAdded(MetricInfo metricInfoc) {}
    void onKafkaMetricRemoved(MetricInfo metricInfoc) {}
}

MyKafkaListener listener;
KafkaClientMetricSet translator = new KafkaClientMetricSet(listener);

It makes sense to only have one instance of KafkaClientMetricSet.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages