sv2000 commented on a change in pull request #2730: GOBBLIN-876: Expose metrics() API in GobblinKafkaConsumerClient to al… URL: https://github.com/apache/incubator-gobblin/pull/2730#discussion_r322495055
########## File path: gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/client/AbstractBaseKafkaConsumerClient.java ########## @@ -84,6 +83,33 @@ public boolean apply(@Nonnull KafkaTopic kafkaTopic) { })); } + /** + * A helper method that returns the canonical metric name for a kafka metric. A typical canonicalized metric name would + * be of the following format: "{metric-group}_{client-id}_{metric-name}". + * @param metricGroup the type of the Kafka metric e.g."consumer-fetch-manager-metrics", "consumer-coordinator-metrics" etc. + * @param metricTags any tags associated with the Kafka metric, typically include the kafka client id, topic name, partition number etc. + * @param metricName the name of the Kafka metric e.g. "records-lag-max", "fetch-throttle-time-max" etc. + * @return the canonicalized metric name. + */ + String canonicalMetricName(String metricGroup, Collection<String> metricTags, String metricName) { Review comment: Added a clarifying comment. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services