feat: expose slowCallDurationThreshold in CircuitBreakerConfiguration#1153
Open
feat: expose slowCallDurationThreshold in CircuitBreakerConfiguration#1153
Conversation
…reshold in CircuitBreakerConfiguration Add two new optional properties to CircuitBreakerConfiguration: - slowCallDurationThreshold (default: 60s, matching Resilience4j default) - slowCallRateThreshold (default: 100%, matching Resilience4j default) Wire both properties through DefaultCircuitBreakerProvider into the Resilience4j CircuitBreakerConfig builder. This is fully backwards-compatible as the defaults match Resilience4j's existing defaults. Resolves SAP#1148 Signed-off-by: dira-AUR <243805326+dira-AUR@users.noreply.github.com>
newtork
reviewed
Apr 23, 2026
Contributor
There was a problem hiding this comment.
Looks good!
Please format javadoc and add @since tag
dira-AUR/cloud-sdk-java@main...newtork:patch-1 (after pulling and merging latest changes from main)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exposes the
slowCallDurationThresholdandslowCallRateThresholdproperties from resilience4j'sCircuitBreakerConfigin the SAP Cloud SDK'sResilienceConfiguration.CircuitBreakerConfigurationwrapper.Motivation
Currently, users who need to configure slow-call detection for their circuit breakers must resort to reflection to access the underlying resilience4j configuration, which is fragile and not officially supported.
The resilience4j
CircuitBreakerConfigsupports:slowCallDurationThreshold— duration above which a call is considered slowslowCallRateThreshold— percentage of slow calls that triggers the circuit breaker to openThese are common production requirements, especially when integrating with external systems (e.g., SAP OData services) that may degrade gradually rather than fail outright.
Changes
slowCallDurationThreshold(Duration)andslowCallRateThreshold(int)toCircuitBreakerConfigurationCircuitBreakerConfig.Builder