Sentinel [Feature] For ParamFlowRule, add support for extracting param from complex object, when grade is RuleConstant.FLOW_GRADE_THREAD

jrcvhitl  于 2021-11-29  发布在  Java
关注(0)|答案(0)|浏览(246)

Issue Description

Add support for extracting param from complex object, when grade is RuleConstant.FLOW_GRADE_THREAD.

Describe what happened (or what feature you want)

When use ParamFlowRule, set grade to RuleConstant.FLOW_GRADE_THREAD, and use ParamFlowArgument as argument, it doesn't work.

Describe what you expected to happen

these two method should take ParamFlowArgument into account:

  1. com.alibaba.csp.sentinel.slots.block.flow.param.ParameterMetric#decreaseThreadCount
  2. com.alibaba.csp.sentinel.slots.block.flow.param.ParameterMetric#addThreadCount

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

  1. set ParamFlowRule.grade = RuleConstant.FLOW_GRADE_THREAD;
  2. use ParamFlowArgument as SphU.entry/exit's args;

Tell us your environment

JDK8, Sentinel1.8.x

Anything else we need to know?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题