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

omqzjyyz  于 23天前  发布在  其他
关注(0)|答案(3)|浏览(26)

读源代码(版本: 1.8.2 )时, sentinel-spring-webmvc-adapter-1.8.2.jar 有提供 com.alibaba.csp.sentinel.adapter.spring.webmvc.SentinelWebInterceptorcom.alibaba.csp.sentinel.adapter.spring.webmvc.SentinelWebTotalInterceptor ,位置如图:

1、为什么 sentinel-annotation-aspectj-1.8.2.jar 只提供 com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect ,没有total相关的类?
2、 annotation 方式,总数如何统计? @SentinelResource(value="xxx") 配置一样的名字是否可以解决?是否有更好的方式?
3、 SentinelWebInterceptorSentinelWebTotalInterceptor 同时配置,是怎么计数的?

ss2ws0br

ss2ws0br1#

Hi, we've not provided such a "total" resource for all @SentinelResource occurrences yet. Could you please illustrate your scenarios?
For 2, it's okay to have multiple @SentinelResource occurrences with the same resource name.
For 3, they have different resource names and metrics in different interceptors.

ldioqlga

ldioqlga2#

Any further feedback? @bingSea

332nm8kg

332nm8kg3#

Any further feedback? @bingSea

我想限制所有资源的总流量,而不是某一资源的流量

相关问题