【问题标题】:How to collect metrics for producer in springboot with micrometer+prometheus?如何使用千分尺+普罗米修斯在springboot中为生产者收集指标?
【发布时间】:2020-01-11 09:08:53
【问题描述】:

我正在尝试使用带有 Springboot 的千分尺来收集 Kafka 消费者和生产者的指标。但无法在千分尺库中找到该类。

消费者属性是:

props.put(ConsumerConfig.METRIC_REPORTER_CLASSES_CONFIG, "io.micrometer.core.instrument.binder.kafka.KafkaConsumerMetrics");

但是如何为生产者收集指标,因为 io.micrometer.core.instrument.binder.kafka.KafkaProducerApiMetrics 不存在于 micrometer 库中。

props.put(ConsumerConfig.METRIC_REPORTER_CLASSES_CONFIG,"io.micrometer.core.instrument.binder.kafka.KafkaProducerApiMetrics");

如果有人能提供帮助将非常感激。

车坛。

【问题讨论】:

    标签: apache-kafka spring-micrometer


    【解决方案1】:
    【解决方案2】:

    快照和最近合并的 Kafka 生产者指标

    https://github.com/micrometer-metrics/micrometer/pull/1835/files

    【讨论】:

      猜你喜欢
      • 2021-11-19
      • 2018-08-16
      • 1970-01-01
      • 1970-01-01
      • 2018-10-30
      • 2020-01-10
      • 2020-11-12
      • 1970-01-01
      • 2023-02-22
      相关资源
      最近更新 更多