Accessing Kafka Streams Metrics
Spring Cloud Stream Kafka Streams 绑定器提供了 Kafka Streams 指标,这些指标可通过 Micrometer MeterRegistry
导出。
Spring Cloud Stream Kafka Streams binder provides Kafka Streams metrics which can be exported through a Micrometer MeterRegistry
.
对于 Spring Boot 版本 2.2.x,指标支持通过绑定器的自定义 Micrometer 指标实现提供。对于 Spring Boot 版本 2.3.x,Kafka Streams 指标支持通过 Micrometer 本机提供。
For Spring Boot version 2.2.x, the metrics support is provided through a custom Micrometer metrics implementation by the binder. For Spring Boot version 2.3.x, the Kafka Streams metrics support is provided natively through Micrometer.
通过 Boot 执行器端点访问指标时,务必将“metrics”添加到属性 management.endpoints.web.exposure.include
。然后,你可以访问 /acutator/metrics
获取所有可用指标的列表,并且可以通过相同的 URI 单独访问每个指标(/actuator/metrics/<metric-name>
)。
When accessing metrics through the Boot actuator endpoint, make sure to add metrics
to the property management.endpoints.web.exposure.include
.
Then you can access /acutator/metrics
to get a list of all the available metrics, which then can be individually accessed through the same URI (/actuator/metrics/<metric-name>
).