alibaba / alibaba/Sentinel

使用网关整合Sentinel,熔断降级规则,使用异常比例和异常数不生效

Open
#2,812 10 comments 0 reactions 0 assignees View on GitHub
area/circuit-breaking area/gateway-flow-control kind/question
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

使用spring cloud gateway网关整合sentinel后,测试异常数和异常比例熔断,不生效
1.设置的熔断策略
![image](https://user-images.githubusercontent.com/74587529/182993414-5e720ff1-e776-469b-b387-467a2e0689c7.png)

2.请求一个异常的接口
![微信图片_20220805111133](https://user-images.githubusercontent.com/74587529/182993632-9ca94cf7-a5bb-4ca5-aff7-6c9153358c17.png)
3.通过debug查看源码,可以看到自己设置的熔断策略
![微信图片_20220805111154](https://user-images.githubusercontent.com/74587529/182993760-0472e73b-2d36-4dfd-8ff8-3032313a3d81.png)
4.但是没有看到的异常,导致没法统计异常数,所以异常数和异常比例的熔断策略失效
![微信图片_20220805111149](https://user-images.githubusercontent.com/74587529/182993897-9ff96e05-8470-499b-95e3-a1e80edaab62.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Spring Cloud Gateway and Sentinel integration described in the steps, including the configured exception-count and exception-ratio rules. Inspect the circuit-breaking and exception-statistics path while requesting the failing endpoint; done means both rules count the observed exception and trigger as configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.