[
https://issues.apache.org/jira/browse/CAMEL-24135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-24135.
---------------------------------
Resolution: Fixed
Both bugs are already fixed on main by commit 9971a57276a2 (CAMEL-24136)
> camel-resilience4j - JMX getNumberOfSlowSuccessfulCalls returns total slow
> calls; console hides failure counts while failure rate is -1
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24135
> URL: https://issues.apache.org/jira/browse/CAMEL-24135
> Project: Camel
> Issue Type: Bug
> Components: eip
> Affects Versions: 4.21.0
> Reporter: Federico Mariani
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.22.0
>
>
> {{ResilienceProcessor}} JMX attribute:
> {code:java}
> @ManagedAttribute(description = "Returns the current number of successful
> calls which were slower than a certain threshold.")
> public int getNumberOfSlowSuccessfulCalls() {
> if (circuitBreaker != null) {
> return circuitBreaker.getMetrics().getNumberOfSlowCalls();
> }
> ...
> }
> {code}
> Copy-paste bug: it returns the *total* number of slow calls. Resilience4j 2.x
> provides {{CircuitBreaker.Metrics.getNumberOfSlowSuccessfulCalls()}}
> (verified against 2.4.0), which is what this attribute should return.
> Related polish in the same area (can be fixed together):
> {{ResilienceConsole}} hard-codes {{failure: 0}} in its text output whenever
> {{getFailureRate() <= 0}}, even when {{getNumberOfFailedCalls() > 0}}.
> Resilience4j returns *-1* while fewer than {{minimumNumberOfCalls}} have been
> recorded (default 100), which is exactly the window where failures
> accumulate, so real failure counts are hidden; the JSON output emits
> {{failureRate: -1.0}} unexplained.
> _Filed by Claude Code on behalf of Federico Mariani (fmariani)_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)