spring-cloud / spring-cloud-circuitbreaker

Spring Cloud Circuit Breaker API and Implementations
Apache License 2.0
336 stars 110 forks source link

Circuit Breaker and Time Limiter metrics are not equal! #142

Closed mortezalatifi closed 2 years ago

mortezalatifi commented 2 years ago

Hello everyone,

we're are using resilience4j in our service and we've noticed that the metrics of circuit breaker and time limiter about the number of calls are not equal and the circuit breaker reports each call twice. As a result the numbers of circuit breaker metrics are doubled.

Dependencies:

org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j io.github.resilience4j:resilience4j-bulkhead io.github.resilience4j:resilience4j-micrometer Spring Versions:

Spring boot: 2.6.1 spring cloud: 2021.0.0 Metrics:

Time Limiter: resilience4j_timelimiter_calls_total Circuit Breaker: resilience4j_circuitbreaker_calls_seconds_count As already explained, these two metrics are not equal and resilience4j_circuitbreaker_calls_seconds_count = resilience4j_timelimiter_calls_total * 2

Is there any explanation for this?

Tnx a lot

ryanjbaxter commented 2 years ago

Can you try 2021.0.1 and if you still see the problem provide an example to reproduce the issue?

mortezalatifi commented 2 years ago

We have updated to the 2021.0.1 and it solved the problem. Tnx a lot.