public static void main(String[] args) { Set<String> tags = new HashSet<>(); tags.add("client-id"); ConsumerMetrics metrics = new ConsumerMetrics(tags, "consumer"); System.out.println(Metrics.toHtmlTable("kafka.consumer", metrics.getAllTemplates())); } }
public static void main(String[] args) { Map<String, String> metricTags = Collections.singletonMap("client-id", "client-id"); MetricConfig metricConfig = new MetricConfig().tags(metricTags); Metrics metrics = new Metrics(metricConfig); ProducerMetrics metricsRegistry = new ProducerMetrics(metrics); System.out.println(Metrics.toHtmlTable("kafka.producer", metricsRegistry.getAllTemplates())); }
/** * Utility to generate the documentation for the Connect metrics. * * @param args the arguments */ public static void main(String[] args) { ConnectMetricsRegistry metrics = new ConnectMetricsRegistry(); System.out.println(Metrics.toHtmlTable(JMX_PREFIX, metrics.getAllTemplates())); } }