hystrix源碼小貼士之Servo Publisher
阿新 • • 發佈:2018-01-04
new bsp 創建 gpo get 源碼 try over span
HystrixServoMetricsPublisher
繼承HystrixMetricsPublisher,創建HystrixServoMetricsPublisherCommand、HystrixServoMetricsPublisherThreadPool、HystrixServoMetricsPublisherCollapser。
@Override public HystrixMetricsPublisherCommand getMetricsPublisherForCommand(HystrixCommandKey commandKey, HystrixCommandGroupKey commandGroupKey, HystrixCommandMetrics metrics, HystrixCircuitBreaker circuitBreaker, HystrixCommandProperties properties) {return new HystrixServoMetricsPublisherCommand(commandKey, commandGroupKey, metrics, circuitBreaker, properties); } @Override public HystrixMetricsPublisherThreadPool getMetricsPublisherForThreadPool(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolMetrics metrics, HystrixThreadPoolProperties properties) {return new HystrixServoMetricsPublisherThreadPool(threadPoolKey, metrics, properties); } @Override public HystrixMetricsPublisherCollapser getMetricsPublisherForCollapser(HystrixCollapserKey collapserKey, HystrixCollapserMetrics metrics, HystrixCollapserProperties properties) {return new HystrixServoMetricsPublisherCollapser(collapserKey, metrics, properties); }
HystrixServoMetricsPublisherCommand
從HystrixCommandMetrics獲取數據,然後設置到DefaultMonitorRegistry中。
HystrixServoMetricsPublisherThreadPool
從HystrixThreadPoolMetrics獲取數據,然後設置到DefaultMonitorRegistry中。
HystrixServoMetricsPublisherCollapser
從HystrixCollapserMetrics獲取數據,然後設置到DefaultMonitorRegistry中。
hystrix源碼小貼士之Servo Publisher