如何将 Resilience-4J 和 Prometheus 与微服务集成。
我已经将微服务与弹性 4j 以及 Prometheus 集成在一起。我的问题是,在 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 Dashboard 弹性查询/矩阵中没有填充。
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 仪表板上的弹性矩阵。