Skip to content

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

@AYue-94

Description

@AYue-94

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/hotspot-param-flowIssues or PRs related to "hot-spot" param flow control

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions