alibaba / alibaba/Sentinel

Why use ParamFlowCheck in GatewayFlowSlot?

Open
#2,971 0 comments 0 reactions 0 assignees View on GitHub
kind/question
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

Gateway中进行接口限流,仅配置GatewayFlowRule,根据Sentinel逻辑,会将GatewayFlowRule转换成ParamFlowRule,并在最终调用接口时,从GatewaSlot中获取ParamFlowRule,使用ParamFlowCheck 进行限流检查。
1、GatewaySlotChainBuilder中构建了执行链路,在有FlowSlow的情况下,为何要在GatewayFlowSlot使用ParamFlowCheck ?
2、在接口未配置热点参数规则的时候,SentinelGatewayFilter会将EntryConfig的args设置为"$D",一旦触发限流,异常为ParamFlowException,异常中包裹的信息就是 $D,输出日志也看不懂。

### Describe what happened (or what feature you want)
请问是什么原因做出这样的设计呢?或者是我这边使用有误才会导致这样的问题,烦请解答。

### Describe what you expected to happen

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

1.
2.
3.

### Tell us your environment
Sentinel 1.7.1

### Anything else we need to know?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.