我使用 Netflix-OSS 库开发了微服务应用程序。我在 localhost:9091/hystrix 上运行的 Hystrix 仪表板上遇到问题。我想监控微服务A和微服务B之间的请求指标。端点“hystrix.stream”已注册。
hystrix 仪表板卡在加载上,没有显示任何结果。
我检查了浏览器并发现 jquery 错误 -
Uncaught TypeError: e.indexOf is not a function 这似乎是 jquery 版本问题。
我使用 Jdk 14 版本和 Spring boot 2.3 进行开发
@bob0the0mighty
I am adding code snippet for your reference. This is my springboot main class
@SpringBootApplication
@EnableEurekaClient
@EnableCircuitBreaker
@EnableHystrixDashboard
public class DramaServiceApplication {
}
My controller looks like :
@GetMapping("/acts")
@com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand(fallbackMethod = "fallbackMethodForGetActor", commandKey = "test-Act", groupKey = "test-Act")
public ActorList getActors() {
ActorList actorList = restTemplate.getForObject("http://actor-service/actor/actorsList", ActorList.class);
return actorList;
}
public ActorList fallbackMethodForGetActor() {
return new ActorList(" Requested Actor page is under maintenance!!");
}
application.yml file looks like :
management:
endpoints:
web:
base-path: /
exposure:
include: hystrix.stream, health, info, metrics
After hitting request multiple times, I am getting hystrix dashboard as "loading" always
and screen looks like
[enter image description here][1]
[1]: https://i.stack.imgur.com/hOeZf.png
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)