-
Notifications
You must be signed in to change notification settings - Fork 431
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
make EntryOptions support storing custom data before Sentinel.Entry() #124
Conversation
Codecov Report
@@ Coverage Diff @@
## master #124 +/- ##
==========================================
- Coverage 43.38% 43.28% -0.11%
==========================================
Files 67 67
Lines 2828 2837 +9
==========================================
+ Hits 1227 1228 +1
- Misses 1463 1471 +8
Partials 138 138
Continue to review full report at Codecov.
|
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.
LGTM
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.
LGTM
Thanks for contributing! |
Support carrying additional attachments with sentinel.Entry(options) (alibaba#124) * make EntryOptions support carrying attachment data * make the `data` field of SentinelInput / SentinelOutput public and rename to `Attachments` Add MetricEventMonitorBlock Signed-off-by: Eric Zhao <sczyh16@gmail.com> Polish MetricItem with monitor-block metric event (alibaba#127) Sync special/metric-event branch with master (alibaba#136) * make EntryOptions support storing custom data before Sentinel.Entry() * make data of SentinelInput / SentinelOutput public & rename to attachment * remove unnecessary check for slidingWindowMetric.intervalInMs * Polish code of buildFlowMap in flow/rule_manager.go (alibaba#131) * Remove unnecessary division checking for interval of SlidingWindowMetric (alibaba#134) Co-authored-by: sdttttt <42728902+sdttttt@users.noreply.github.com> Add max concurrency statistic data (alibaba#138) Add support for getting max concurrency of the latest second (alibaba#140) feat: add SecondMaxConcurrency field to MetricItem (alibaba#145) feat: allow to disable metric log flush in runtime (alibaba#147)
Support carrying additional attachments with sentinel.Entry(options) (#124) * make EntryOptions support carrying attachment data * make the `data` field of SentinelInput / SentinelOutput public and rename to `Attachments` Add MetricEventMonitorBlock Signed-off-by: Eric Zhao <sczyh16@gmail.com> Polish MetricItem with monitor-block metric event (#127) Sync special/metric-event branch with master (#136) * make EntryOptions support storing custom data before Sentinel.Entry() * make data of SentinelInput / SentinelOutput public & rename to attachment * remove unnecessary check for slidingWindowMetric.intervalInMs * Polish code of buildFlowMap in flow/rule_manager.go (#131) * Remove unnecessary division checking for interval of SlidingWindowMetric (#134) Co-authored-by: sdttttt <42728902+sdttttt@users.noreply.github.com> Add max concurrency statistic data (#138) Add support for getting max concurrency of the latest second (#140) feat: add SecondMaxConcurrency field to MetricItem (#145) feat: allow to disable metric log flush in runtime (#147)
* sycn special branch commits Support carrying additional attachments with sentinel.Entry(options) (#124) * make EntryOptions support carrying attachment data * make the `data` field of SentinelInput / SentinelOutput public and rename to `Attachments` Add MetricEventMonitorBlock Signed-off-by: Eric Zhao <sczyh16@gmail.com> Polish MetricItem with monitor-block metric event (#127) Sync special/metric-event branch with master (#136) * make EntryOptions support storing custom data before Sentinel.Entry() * make data of SentinelInput / SentinelOutput public & rename to attachment * remove unnecessary check for slidingWindowMetric.intervalInMs * Polish code of buildFlowMap in flow/rule_manager.go (#131) * Remove unnecessary division checking for interval of SlidingWindowMetric (#134) Co-authored-by: sdttttt <42728902+sdttttt@users.noreply.github.com> Add max concurrency statistic data (#138) Add support for getting max concurrency of the latest second (#140) feat: add SecondMaxConcurrency field to MetricItem (#145) feat: allow to disable metric log flush in runtime (#147) * fix: fix broken test code * hotspot_rule_add_paramKey * concurrent processing(error group) for ExtractArgs Iteration * refmt * goimports Co-authored-by: Liu Jing <anderson.liuj@antfin.com> Co-authored-by: cafra <2443591230@qq.com>
Describe what this PR does / why we need it
We need to pass some data about current invocation to slots, while these data is parsed before
Sentinel.Entry()
.EntryOptions
is a suitable place but extra attribute is required.Does this pull request fix one issue?
None.
Describe how you did it
Add a map
data map[string]interface{}
(and several functions associated) toEntryOptions
.Describe how to verify it
Special notes for reviews