alibaba / alibaba/Sentinel

API Gateway exceptionQps not recorded for upstream 5xx | 网关访问后端返回 5xx 时无法统计为异常

Open
#1,706 5 comments 0 reactions 0 assignees View on GitHub
area/gateway-flow-control good first issue
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

bug report

### Describe what happened (or what feature you want)
使用spring-cloud-alibbaa集成的sentinel-spring-cloud-gateway-example测试代码
①通过网关访问后端服务,路由里配置一个错误的端口导致连接不上时,请求返回500,,exceptionQps统计数据有计数
![image](https://user-images.githubusercontent.com/16300233/91651768-221bf000-eac3-11ea-85ef-f54d4856ecc8.png)
![image](https://user-images.githubusercontent.com/16300233/91651771-2c3dee80-eac3-11ea-88c5-452ecbb35ed2.png)
②通过网关访问后端服务,接口能连接上,但是后端服务代码异常,请求同样返回500,,exceptionQps统计数据一直显示为0
![image](https://user-images.githubusercontent.com/16300233/91651783-67d8b880-eac3-11ea-9728-eb4091ed099f.png)
![image](https://user-images.githubusercontent.com/16300233/91651788-77f09800-eac3-11ea-92e0-7e8fba0dc798.png)

### Describe what you expected to happen
请求同样是500 希望都能统计

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

1. 使用spring-cloud-alibbaa集成的sentinel-spring-cloud-gateway-example测试代码
2. 将网关路由配置错的端口,请求访问返回500,exceptionQps会计数
3. 将网关路由配置对的端口,但代码内部使用 10/0 这种错误代码,请求返回500,exceptionQps不会计数

### Tell us your environment
spring-cloud-alibaba-gateway,2.2.1.RELEASE

### Anything else we need to know?

Contributor guide

Open the contributing guide

Research direction

Start with the spring-cloud-alibaba-gateway,2.2.1.RELEASE integration and run the sentinel-spring-cloud-gateway-example described in the report. Compare an unreachable upstream with a reachable upstream that throws an exception, then verify that exceptionQps records both HTTP 500 cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.