简体   繁体   中英

How to expose Hystrix's circuit breaker status through JMX

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 (eg counters, gauges, etc) using hystrix-servo-metrics-publisher .

Is it possible to expose circuit breaker status on JMX?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM