读源代码(版本: 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
,位置如图:
1、为什么 sentinel-annotation-aspectj-1.8.2.jar
只提供 com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect
,没有total相关的类?
2、 annotation
方式,总数如何统计? @SentinelResource(value="xxx")
配置一样的名字是否可以解决?是否有更好的方式?
3、 SentinelWebInterceptor
与 SentinelWebTotalInterceptor
同时配置,是怎么计数的?
3条答案
按热度按时间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.
ldioqlga2#
Any further feedback? @bingSea
332nm8kg3#
Any further feedback? @bingSea
我想限制所有资源的总流量,而不是某一资源的流量