2023.0.3.3 网关的流控和熔断页面无法正常显示(实际2023.0.1.0之后的版本都不工作)
Which Component Spring Cloud Alibaba 2023.0.3.3(Sentinel)
Describe the bug For Spring cloud alibaba 2023.0.3.3, the gateway flow control and circuitbreaker control rules cannot show properly on sentinel 1.8.8 dashboard, but for 2023.0.1 It is normal. Simplest demo I provide an example to easily reproduce the problem.
To Reproduce Steps to reproduce the behavior:
- start the gateway-circuitbreaker app
- start the app-service app;
- access to it via http://localhost:8086/api/user/1 and then see the pages in sentinel databoard 1.8.8
Expected behavior API gateway items on left side should appear and now It is showing like normal pages for flow control and circuitbreaker control , not for api gateway.
Screenshots
Additional context java 17, sentinel dashboard 1.8.8, spring cloud alibaba 2023.0.3.3
Temp Solution as below
comment the code below in SentinelApplicationContextInitializer.java and move to SentinelAutoConfiguration.java
if (properties.isEager()) { InitExecutor.doInit(); }
===> ` public class SentinelAutoConfiguration { @Autowired private SentinelProperties properties;
/**
* InitExecutor.doInit() will invoke the SentinelConfig static block which will then evaluate the csp.sentinel.app.type=11
* If applied in SentinelApplicationContextInitializer, the csp.sentinel.app.type is not set in SentinelSCGAutoConfiguration and
* give value zero
*/
@PostConstruct
public void init() {
// earlier initialize
if (properties.isEager()) {
InitExecutor.doInit();
}
}
`
Please help provide a good solution if you have.
这个不是可以通过配置进行修改么: spring.cloud.sentinel.eager=true
这个不是可以通过配置进行修改么:
spring.cloud.sentinel.eager=true
配置了,但是还有问题,调用获得csp.sentinel.app.type的时间点不同版本发生了变化
This issue has been open 30 days with no activity. This will be closed in 7 days.
This issue has been automatically marked as stale because it hasn't had any recent activity.If you think this should still be open, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up. Thank you for your interest and contribution to the Sping Cloud Alibaba Community.