Spring boot 致动器/指标端点中的Hystrix指标[spring boot 2.0]
可以通过与spring boot 1.5中类似的方式获取hystrix度量信息 在1.5公制端点中,我有如下内容:Spring boot 致动器/指标端点中的Hystrix指标[spring boot 2.0],spring-boot,hystrix,spring-boot-actuator,Spring Boot,Hystrix,Spring Boot Actuator,可以通过与spring boot 1.5中类似的方式获取hystrix度量信息 在1.5公制端点中,我有如下内容: "gauge.servo.hystrix.hystrixcommand.[service-name].[method].errorcount": 0, "gauge.servo.hystrix.hystrixcommand.[service-name].[method].requestcount": 0, "gauge.servo.hystrix.hystrixcomma
"gauge.servo.hystrix.hystrixcommand.[service-name].[method].errorcount": 0,
"gauge.servo.hystrix.hystrixcommand.[service-name].[method].requestcount": 0,
"gauge.servo.hystrix.hystrixcommand.[service-name].[method].latencytotal_mean": 0,
但现在,对于使用测微计的致动器/公制端点,我找不到任何术语“hystrix”、“netflix”等的参考
我已经为我的应用程序配置了@enablebuircuitbreaker
和hystrix:metrics:enabled:true
有什么方法可以在不使用hystrix.stream端点的情况下获得这些信息?或者这应该是有效的,我做错了什么吗?接下来,您必须向应用程序添加以下bean以注册Hystrix Metrics活页夹:
@Configuration
public class MetricsConfig {
@Bean
HystrixMetricsBinder registerHystrixMetricsBinder() {
return new HystrixMetricsBinder();
}
}
如本文所述,hystrix度量现在应显示如下:
"gauge.servo.hystrix.hystrixcommand.[service-name].[method].errorcount": 0,
"gauge.servo.hystrix.hystrixcommand.[service-name].[method].requestcount": 0,
"gauge.servo.hystrix.hystrixcommand.[service-name].[method].latencytotal_mean": 0,
hystrix.errors{event=“short_circuited”}
@JoelC经过一些测试,建议的答案有效。请你把你的-1拿开好吗?很高兴听到;对不起,我看不出这是如何回答这个问题的。-1不是我的,如果可以的话,我会删除我以前的评论。