У меня есть приложение spring-boot с включенными Actuator и Hystrix.
Spring-Boot-Version: 1.3.1.RELEASE
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
Когда я добавляю @HystrixCommand
к некоторым методам, /metrics
конечная точка показывает все метрики из hystrix:
gauge.hystrix.HystrixCommand.RestEndpoints.TestController.test.errorPercentage: 0,
gauge.hystrix.HystrixThreadPool.RestEndpoints.rollingMaxActiveThreads: 1,
...
Вопрос.
Как полностью исключить hystrix-метрики из /metrics
endpoint?
Обновление 1
Я попытался исключить ServoMetrics и SpectatorMetrics с помощью следующих подходов:
1)
@EnableAutoConfiguration(exclude={ServoMetricsAutoConfiguration.class,
SpectatorMetricsAutoConfiguration.class} )
2)
@SpringBootApplication(exclude={ServoMetricServices.class, SpectatorMetricServices.class})
Но оба не добились желаемого эффекта.
com.netflix.hystrix:hystrix-metrics-event-stream
из своих зависимостей, что также приведет к тому, что/hystrix.stream
перестанет работать. - person spencergibb   schedule 20.01.2016