We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Type: feature request
Support carrying params by key-value in sentinel.Entry(options...). An example:
sentinel.Entry(options...)
sentinel.Entry(WithArg("key1", "value1"), WithArg("key2", "value2"));
热点参数埋点支持以 key-value 的方式传入参数,这样开发者可以无需像之前传入 args 一样关心参数顺序,从而更方便的配置热点规则(按照 key 来匹配即可,不需按参数匹配)。
热点规则的设计,以及 Entry API 的设计需要做相应的调整。
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
目前已支持,如下:
e, b := sentinel.Entry("abc", sentinel.WithArgs(false, uint32(9), sentinel.WithAttachments(map[interface{}]interface{}{ testKey: rand.Uint64() % 10, }), ))
Sorry, something went wrong.
Args, Attachments 的用途,咱们可以在文档里面明确下哈,方便大家进行扩展使用。cc @LearningGp
cc @ansiz 可以看下对扩展性的需求
@sczyh30 我看title上看跟热点限流有关系?但是好像没看到热点限流那边的改动?这个改动有完整的PR链接吗?
我们之前其实已经做过类似的实现,在热点限流支持指定key,再从上下文里提取参数
binbin0325
No branches or pull requests
Issue Description
Type: feature request
Describe what feature you want
Support carrying params by key-value in
sentinel.Entry(options...)
. An example:热点参数埋点支持以 key-value 的方式传入参数,这样开发者可以无需像之前传入 args 一样关心参数顺序,从而更方便的配置热点规则(按照 key 来匹配即可,不需按参数匹配)。
热点规则的设计,以及 Entry API 的设计需要做相应的调整。
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: