hystrix源码小贴士之Servo Publisher
2024-09-07 20:36:36
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中。
最新文章
- get和post的区别
- 使div下的图片自适应div的大小
- Oracle内存管理技术
- AngularJS学习之模型
- CCS float vs clear
- homework-01 ";最大子数组之和";的问题求解过程
- 在centos上使用yum安装redis及php扩展php-redis
- 关于JSF国际化问题
- 一个部署了tomcat服务的linux服务器,运行一段时间后出现内存和空间不足的问题
- jmeter笔记(1)--原理,下载与安装
- iOS 控制器的生命周期(UIController)
- SSM框架-初学Mybatis框架
- xadmin后台页面的自定制
- 【BZOJ5469】[FJOI2018]领导集团问题(动态规划,线段树合并)
- 微信小程序-添加手机联系人
- Launch 启动全屏 隐藏上方状态栏
- Install and Configure Apache Kafka
- AOP的异常通知
- e613. Modifying the Focus Traversal Order
- [lr] 基本色调调整和色调曲线