Sentinel Dashboard中的链路不对
来源:8-5 流控规则

JustryDeng
2020-02-14
软硬件环境:
1、IDEA
2、JDK1.8
3、Sentinel 1.7.0
4、Spring Boot 2.1.1.RELEASE
5、Spring Cloud Greenwich.SR3
6、Spring Cloud Alibaba 2.1.1.RELEASE
- 问题描述:
Sentinel Dashboard中的链路,与代码中的配置不相符
。- 代码是这样的:
import com.alibaba.csp.sentinel.annotation.SentinelResource; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; /** * 流控 * * @author JustryDeng * @date 2020/2/14 17:01 */ @RestController @RequiredArgsConstructor public class FlowControlController { private final TmpService tmpService; @GetMapping("/hello") public String ds() { return "hello DengShuai"; } @GetMapping("/hi") public String jd() { return "hi JustryDeng"; } @GetMapping("/abc") public String abc() { return "DengShuai invoke " + tmpService.commonLogic(); } @GetMapping("/xyz") public String xyz() { return "JustryDeng invoke " + tmpService.commonLogic(); } @Component public static class TmpService { @SentinelResource(value = "common") public String commonLogic() { return "i am service logic"; } } }
- Sentinel Dashboard中是这样的:
- 代码是这样的:
- 问题:
在看了其它的issue后,我怀疑这可能是版本的问题;但是由于我在学习前面的内容的时候,就是采用的上述软硬件环境,为了保持一致,我不想把Sentinel这块儿的版本调低。所以,- 上述问题是版本的问题吗?
- 如果是版本的问题的话,有没有什么好的解决方式呢?(因为我准备找到一个相对较稳定的版本,应用于生产,如果上述问题能比较好的解决的话,我觉得当前用的Spring Cloud Alibaba 2.1.1.RELEASE版本就可以考虑)
写回答
1回答
-
这是sentinel 1.7.0带来的bug,目前还没有解决。 可以降级到1.6或更低版本022020-02-15
相似问题