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

Metircs: I think the requestBeforeEvent in metrics may be redundant and needs to be optimized. #12654

Closed
CLFutureX opened this issue Jul 3, 2023 · 1 comment
Labels
type/proposal Everything you want Dubbo have

Comments

@CLFutureX
Copy link
Contributor

CLFutureX commented Jul 3, 2023

"RequestBeforeEvent" is a type of "RequestEvent" (FORBIDDEN_EXCEPTION) and should not be created as a new class as it is redundant and difficult to maintain.
我认为requestBeforeEvent属于requestEvent的一种场景, 不应该单独创建一个类,有点多余

If it is necessary to separately monitor this type of event, it is recommended to add the constant "INVOCATION_REQUEST_BEFORE" and provide the "isRequestBeforeEvent" method.

RequestBeforeEvent属于RequestEvent的一种(访问限制),不应该新建一个类,过于冗余且不易维护,如果需要单独监听这种类型的事情,建议通过添加常量INVOCATION_REQUEST_BEFORE,并提供isRequestBeforeEvent方法即可,

forexample:
add constant:
新增常量:
image
Add the toRequestBeforeEvent method:
新增RequestBeforeEvent结构体方法:
image
新增判断方法:
Add the isRequestBeforeEvent method:
image

@CLFutureX CLFutureX added the type/proposal Everything you want Dubbo have label Jul 3, 2023
@songxiaosheng
Copy link
Member

多个类型 vs 多个常量

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/proposal Everything you want Dubbo have
Projects
Archived in project
Development

No branches or pull requests

3 participants