Sentinel
Sentinel copied to clipboard
Add extended identifiers in flow rules to achieve alarming when rules are triggered
Issue Description
I plan to encapsulate some warning functions on the basis of Sentinel. At present, when the rules fail to pass, only the types of exception types can not pass, and it is impossible to know what specific rules are not passed, so that some personalized warnings cannot be made. . // 我计划在Sentinel的基础上封装一些预警功能,目前当出现规则不通过时,只能通过异常类型什么类型的规则不通过,无法知道具体的什么规则不通过,这样就无法做一些个性化的预警. Type: bug report or feature request feature request
Describe what happened (or what feature you want)
- Add an id field to each rule to increase the uniqueness of the rule. // 1.每个规则上面新增id字段,增加规则的唯一标示性
- Added an early warning registration module to allow users to register a custom type of early warning processor, such as: flow control early warning device, fuse downgrade early warning device // 2.新增预警注册模块,允许用户注册自定义类型的预警处理器,如:流控预警器,熔断降级预警器
- In the Slot, when the check rule does not pass, first send an alert message to the alert listener, and then throw an exception. // 3.在Slot中,check rule不通过时,先向预警监听器发送预警信息,后再抛出异常
Describe what you expected to happen
- Add an id field to each rule to increase the uniqueness of the rule. // 1.每个规则上面新增id字段,增加规则的唯一标示性
- Added an early warning registration module to allow users to register a custom type of early warning processor, such as: flow control early warning device, fuse downgrade early warning device // 2.新增预警注册模块,允许用户注册自定义类型的预警处理器,如:流控预警器,熔断降级预警器
- In the Slot, when the check rule does not pass, first send an alert message to the alert listener, and then throw an exception. // 3.在Slot中,check rule不通过时,先向预警监听器发送预警信息,后再抛出异常
How to reproduce it (as minimally and precisely as possible)
Tell us your environment
win10,idea
Anything else we need to know?
nothing
*** WE STRONGLY SUGGEST YOU TO DESCRIBE YOUR ISSUE IN ENGLISH ***
Refer to https://github.com/alibaba/Sentinel/pull/418#issuecomment-458024816