Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More information (e.g. triggered rules, real-time QPS) is needed to carry in BlockException #424

Closed
yikangfeng opened this issue Jan 16, 2019 · 3 comments · Fixed by #469
Labels
kind/enhancement Category issues or prs related to enhancement.
Milestone

Comments

@yikangfeng
Copy link
Contributor

yikangfeng commented Jan 16, 2019

Issue Description

Type: feature request

Describe what happened (or what feature you want)

在捕获到热点参数限流的异常 或者 其他限流形式的异常后 希望能够获取到一些信息,例如,当发生热点参数限流后,捕获到这个 ParamFlowException 后(其他异常也同样需要),希望能获取到 当前发生限流的方法信息,方法上打的RequestMapping 接口信息,当前触发限流的规则信息,当前的QPS值,配置的QPS值,资源名 等信息,方便在运行时拿到这些信息发送报警。

More information (e.g. triggered rules, real-time QPS) is needed to carry in BlockException so that we can leverage relevant info to send alarm messages.

Describe what you expected to happen

希望能获取到 当前发生限流的方法信息,方法上打的RequestMapping 接口信息,当前触发限流的规则信息,当前的QPS值,配置的QPS值,资源名 等信息,方便在运行时拿到这些信息发送报警。

强烈需要在 1.4.2 版本就要支持。

@sentinel-bot
Copy link
Collaborator

Hi @yikangfeng, we detect non-English characters in the issue. This comment is an auto translation from @sentinel-bot to help other users to understand this issue.
We encourage you to describe your issue in English which is more friendly to other users.

After capturing the exception of the hotspot parameter current limit or other abnormality of the current limiting form, I hope to enhance the function to obtain some information.

Issue Description

Type: bug report or feature request

Describe what happened (or what feature you want)

After capturing the exception of the hotspot parameter current limit or other abnormality of the current limiting form, I hope to obtain some information. For example, after the hotspot parameter is limited, after the ParamFlowException is captured (other exceptions are also required), I hope to obtain it. Method information to the current current limit, the RequestMapping interface information on the method, the current rule information that triggers the current limit, the current QPS value, the configured QPS value, the resource name, etc., so that it is convenient to get the information to send an alarm at runtime. .

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

  1. It is desirable to obtain the method information of the current current limiting method, the RequestMapping interface information on the method, the current rule information of the current limiting current limit, the current QPS value, the configured QPS value, the resource name, etc., which are convenient to be taken at runtime. Send an alarm to these messages.

Tell us your environment

Anything else we need to know?

@sentinel-bot sentinel-bot changed the title 在捕获到热点参数限流的异常 或者 其他限流形式的异常后 希望能够增强功能获取到一些信息 After capturing the exception of the hotspot parameter current limit or other abnormality of the current limiting form, I hope to enhance the function to obtain some information. Jan 16, 2019
@sczyh30 sczyh30 changed the title After capturing the exception of the hotspot parameter current limit or other abnormality of the current limiting form, I hope to enhance the function to obtain some information. More information (e.g. triggered rules, real-time QPS) is needed to carry in BlockException Jan 16, 2019
@sczyh30 sczyh30 added the kind/enhancement Category issues or prs related to enhancement. label Jan 16, 2019
@sczyh30 sczyh30 added this to the 1.4.2 milestone Jan 16, 2019
@sczyh30
Copy link
Member

sczyh30 commented Jan 16, 2019

Hi, thanks for your suggestion. We can put the triggered rule and maybe current metrics to the subclasses of BlockException. This is expected to be released in 1.4.2.

@sczyh30
Copy link
Member

sczyh30 commented Feb 22, 2019

Sentinel 1.4.2 has been released and now we can get the triggered rule via the BlockException#getRule method. If you're going to add alarm listener, you can leverage callbacks in StatisticSlot. See here for instructions: #418 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants