-
Notifications
You must be signed in to change notification settings - Fork 439
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
fix: add traffic-type label to distinguish pass type, fix #501 #502
base: master
Are you sure you want to change the base?
Conversation
Hi, could you please sign the CLA here: https://cla-assistant.io/alibaba/sentinel-golang?pullRequest=502 |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core/stat/stat_slot.go
Outdated
@@ -52,7 +52,7 @@ func (s *Slot) OnEntryPassed(ctx *base.EntryContext) { | |||
s.recordPassFor(InboundNode(), ctx.Input.BatchCount) | |||
} | |||
|
|||
handledCounter.Add(float64(ctx.Input.BatchCount), ctx.Resource.Name(), ResultPass, "") | |||
handledCounter.Add(float64(ctx.Input.BatchCount), ctx.Resource.Name(), ResultPass, "", ctx.Resource.FlowType().String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用flowType 只能区分出inboud/outbound。 如果要区分出具体命中的rule类型,可以将命中的规则类型,暂存到ctx的data map中,然后在这里提取。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,我添加了命中规则的名称,请帮忙审阅一下
Describe what this PR does / why we need it
Does this pull request fix one issue?
Describe how you did it
Describe how to verify it
Special notes for reviews