How to expose Hystrix's circuit breaker status through JMX

坚强是说给别人听的谎言 提交于 2019-12-10 14:15:02

问题


I've been looking for a tutorial on how to expose Hystrix's circuit breaker status on JMX. I just found out an API for exposing metrics (e.g counters, gauges, etc) using hystrix-servo-metrics-publisher.

Is it possible to expose circuit breaker status on JMX?


回答1:


I found the solution, just start this code:

HystrixPlugins.getInstance().registerMetricsPublisher(
    HystrixServoMetricsPublisher.getInstance());

After this you'll see the metrics on JMX in com.netlix.servo.

Obs: The information will be available on JMX only after the first server request.



来源:https://stackoverflow.com/questions/31324978/how-to-expose-hystrixs-circuit-breaker-status-through-jmx

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