sentinel-metric-exporter组件无法暴露指标的规则类型,需要增强

jgovgodb  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(73)

Issue Description

Type: feature request

Describe what feature you want

sentinel-metric-exporter组件暴露的mxbean中只有资源名称没有资源的规则类型,例如有一条限流规则resourceName=“/aaa/bbb”
有另外一条降级规则是resourceName=“/ccc/ddd” 在看监控时无法看出来当前是因为限流而block还是因为降级而block,因为只有blockQps这一个属性,建议添加一个属性支出当前规则属于限流还是降级还是系统自适应流控等,方便更好的监控和告警,目前可以看到的解决方案只能从资源名入手,例如设置为 resourceName=“flowCtrl:资源名” resourceName=“degrade:资源名”这样 但是截取字符串的方式并不优雅,另外对于FlowRuleManager和DegradeRuleManager来说,其load方法就能很好的区分出不通类型的规则到底是什么类型,但是在看监控时就看不出来混为一体了,不合类,另外查看sentinel-core项目的源码也没有发现核心包里的统计类对此有字段的支持,可能改造的话也需要从这里入手埋点这个类型字段吧,如有更好的方式,请教大家。

english:
The Sentinel-Metry-Exporter component is not exporter of rules types of resources in the MXBeans exposed, only the resource names, but not the resources; for example, with a flow limiting rule resourceName= "/aaa/bbb"

Another degradation rule is resourceName= "/ccc/ddd". When viewing the monitoring, you cannot tell whether the current block is due to the flow limiting or the degradation, because there is only one blockQps attribute. It is suggested to add an attribute that the current rule belongs to traffic limiting, degradation or system adaptive flow control to facilitate better monitoring and alarm. Currently, the available solution can only start from the resource name. For example, resourceName= "flowCtrl: Resource name" resourceName= "degrade: Resource name" but it is not elegant to degrade the string and DegradeRuleManager, The load method can well distinguish the rules of different types, but it can not be seen when watching the monitoring, mixed together, not the class, in addition to the source code of sentinel-core project did not find that the core package of statistics class to support this field, possible transformation also need to start from here bury this type of field. If there is a better way, please consult us.

Describe your initial design (if present)

Additional context

Add any other context or screenshots about the feature request here.

相关问题