如何将弹性4J和普罗米修斯与微服务集成。
我与弹性4J和普罗米修斯的综合微服务。 我的问题是,在Prometheus中,我没有得到任何弹性查询,只有http和其他默认值是填充的。
Kindly help
Steps that i have implemented so far are listed below...
1>created micro-services
2>Integrate micro-services with Resilience 4j by following steps
i>dependency in pom.xml file
ii>created separate class of Circuit-breaker and retry module.
iii>After that i have added Prometheus by adding its jar
which is...
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
3>在Prometheus仪表板的弹性查询/矩阵中没有填充。
i.e # HELP resilience4j_circuit-breaker_calls Circuit Breaker Call Stats
# TYPE resilience4j_circuit-breaker_calls gauge
resilience4j_circuit-breaker_calls{name="backendB",call_result="successful",} 0.0
resilience4j_circuit-breaker_calls{name="backendB",call_result="failed",} 0.0
请帮助。预先感谢
我还在下面添加了以下依赖性4J和Prometheus集成...
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-metrics</artifactId>
<version>0.16.0</version>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-prometheus</artifactId>
<version>0.16.0</version>
</dependency>
想要在Prometheus仪表板上的弹性矩阵。
您是否使用Spring Boot 1或Spring Boot 2之类的框架?如果是这样,您可以查看我们的演示,其中还包括一个用于Prometheus的Grafana仪表板。
https://github.com/Resilience4J/Resilience4j-spring-boot2-demo
如果要使用千分尺,则不应添加resilience4j-prometheus
或resilience4j-metrics
。resilience4j-prometheus
使用Prometheus Java库,resilience4j-metrics
使用Dropwizard指标。您应该添加resilience4j-micrometer
。但是,如果您使用我们的Spring Boot 2启动器。