Hystrix Health Indicator及Metrics Stream支持
生活随笔
收集整理的這篇文章主要介紹了
Hystrix Health Indicator及Metrics Stream支持
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Health Indicator健康指標https://cloud.spring.io/spring-cloud-static/Brixton.SR7/就是我這個movie應用,訪問movie應用的health,路徑它會得到這種東西The state of the connected circuit breakers are also exposed in the /health endpoint of the calling application.{"hystrix": {"openCircuitBreakers": ["StoreIntegration::getStoresByLocationLink"],"status": "CIRCUIT_OPEN"},"status": "UP"
}10.40.8.152:8761localhost:8010/health{"description":"Spring Cloud Eureka Discovery Client","status":"UP"}localhost:8010/movie/1請求到用戶微服務的APIHystrix Metrics Streamhttps://cloud.spring.io/spring-cloud-static/Brixton.SR7/如果你想使用Hystrix Metrics Stream,你需要加這個依賴,我們不加這個項目都啟動不起來,<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId>
</dependency>To enable the Hystrix metrics stream include a dependency on spring-boot-starter-actuator. This will expose the /hystrix.stream as a management endpoint.localhost:8010/hystrix.streamlocalhost:8010/movie/1訪問一下就有結果了hystrix.stream他其實是一種監控,監控每一個API,比如線程,還有一一些其它的信息,斷路器是否打開了,那這個消息其實很難閱讀的,我們到時會講一個dashboard,我們把movie加上hystrix,feign怎么玩呢,他也可以支持用這樣的方法,Feign也是支持Hystrix的
?
總結
以上是生活随笔為你收集整理的Hystrix Health Indicator及Metrics Stream支持的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Hystrix Health Indic
- 下一篇: 如何禁用单个FegionClient的H