alibaba / alibaba/Sentinel

How to distinguish exceptions in metrics?如何在指标统计中区分不同的异常?

Open
#2,077 1 comment 0 reactions 0 assignees View on GitHub
area/metrics
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

*feature request*

### Describe what happened (or what feature you want)
How to distinguish exceptions in metrics?
如何在指标统计中区分不同的异常?

### Describe what you expected to happen
If you visit http://ip:port/metrics, you will get resourceName, passQps, blockQps and so on. But there is no metric to distinguish the real exceptions. After reading the code, I found that there is exception infomation in sentinel-block.log. Could the metrics be filled with exception infomation in the future?

在http://ip:port/metrics 接口中,获取到的metric数据包含了资源名、通过流量、拒绝流量等信息,但是无法区分时间窗口内的请求是什么原因被拒绝的。比如是FlowException还是DegradeException。在sentinel-block.log中有异常相关信息,看了源码当前还没有读取sentinel-block.log相关的逻辑。请问会将sentinel-block.log的异常信息整合到metric相关数据中吗?

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

1. Visit http://ip:port/metrics
2. Check the result, there is no exception infomation.

1. 访问 http://ip:port/metrics
2. 获取的信息中没有异常相关信息。

### Tell us your environment
sentinel 1.8.0

### Anything else we need to know?
Nothing.

Contributor guide

Open the contributing guide

Research direction

Start at the /metrics endpoint and compare its current resourceName, passQps, and blockQps output with the exception information described in sentinel-block.log. Determine which exception distinctions the metrics should expose and how completion can be verified for Sentinel 1.8.0; the issue does not name source files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.