You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/07/16 12:42:00 UTC

[jira] [Assigned] (CAMEL-24135) camel-resilience4j - JMX getNumberOfSlowSuccessfulCalls returns total slow calls; console hides failure counts while failure rate is -1

     [ https://issues.apache.org/jira/browse/CAMEL-24135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-24135:
-----------------------------------

    Assignee: Claus Ibsen

> 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
>
> {{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)