fix(cb-empty-actuator): register processPayment circuit breaker - #1
Open
AdolfCarr wants to merge 1 commit into
Open
fix(cb-empty-actuator): register processPayment circuit breaker#1AdolfCarr wants to merge 1 commit into
AdolfCarr wants to merge 1 commit into
Conversation
- Problem:
The /actuator/circuitbreakers endpoint was returning empty `{}` because
no circuit breaker instance had been explicitly created. Resilience4j
only registers breakers lazily — they appear in the actuator only when
configured by name or first used at runtime.
- Solution:
Added an explicit instance definition for the processPayment circuit
breaker, linking it to the default configuration:
`resilience4j.circuitbreaker.instances.processPayment.base-config=default`
This ensures the breaker is always registered and visible in actuator
endpoints.
- Steps to verify:
1. Restart the application
2. Call /processPayment endpoint a few times
3. Check /actuator/circuitbreakers to see processPayment metrics
Note: cb = circuit breaker
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.
Problem: The /actuator/circuitbreakers endpoint was returning empty
{}because no circuit breaker instance had been explicitly created. Resilience4j only registers breakers lazily — they appear in the actuator only when configured by name or first used at runtime.Solution: Added an explicit instance definition for the processPayment circuit breaker, linking it to the default configuration:
This ensures the breaker is always registered and visible in actuator endpoints.
Note: cb = circuit breaker