Spring Cloud Zuul Monitor/CircuitBreaker All Routes via Hystrix

[亡魂溺海] 提交于 2019-12-08 05:12:57

问题


I am using Spring Cloud and @EnableZuulProxy Is it possible to monitor all routes configured in application.yml using hystrix via /hystrix.stream? In the example below I would like to have a simple way to monitor all request made to the down stream product service. I understand that I can do this on the product service itself, but is it possible to monitor Zuul request. This would be useful for any down stream services that are not owned (third party) and cannot be annotated with the @HystrixCommand.

zuul: routes: item: serviceId: product path: /product/**


回答1:


The simple answer is yes. Add spring-cloud-starter-hystrix and add @EnableCircuitBreaker to your main class. That will enable /hystrix.stream. Zuul uses hystrix when forwarding to other services.




回答2:


I had the same issue and changing @EnableCircuitBreaker to @EnableHystrix fixed the problem.

With @EnableHystrix I can see all the routed calls on the Hystrix dashboard.

Update

See comment below, this is indeed not the fix.



来源:https://stackoverflow.com/questions/32490269/spring-cloud-zuul-monitor-circuitbreaker-all-routes-via-hystrix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!