alibaba / alibaba/Sentinel

SentinelResourceAspect为什么没有total相关类 | Why there is not a "total" resource for all @SentinelResource occurrences?

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

Description

读源代码(版本:`1.8.2` )时, `sentinel-spring-webmvc-adapter-1.8.2.jar` 有提供 `com.alibaba.csp.sentinel.adapter.spring.webmvc.SentinelWebInterceptor` 和 `com.alibaba.csp.sentinel.adapter.spring.webmvc.SentinelWebTotalInterceptor`,位置如图:
![image](https://user-images.githubusercontent.com/12644274/202640921-4cb52289-244f-4010-a9c4-813078248998.png)
1、为什么 `sentinel-annotation-aspectj-1.8.2.jar` 只提供 `com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect`,没有total相关的类?
2、`annotation` 方式,总数如何统计?`@SentinelResource(value="xxx")` 配置一样的名字是否可以解决?是否有更好的方式?
3、`SentinelWebInterceptor` 与 `SentinelWebTotalInterceptor` 同时配置,是怎么计数的?

Contributor guide

Open the contributing guide

Research direction

Compare SentinelResourceAspect in sentinel-annotation-aspectj-1.8.2.jar with SentinelWebInterceptor and SentinelWebTotalInterceptor in sentinel-spring-webmvc-adapter-1.8.2.jar. Trace how annotation-based resources and the two web interceptors are counted, then document whether equal @SentinelResource values aggregate and how simultaneous interceptor configuration behaves.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.