Skip to content

fix(cb-empty-actuator): register processPayment circuit breaker - #1

Open
AdolfCarr wants to merge 1 commit into
codingtogetherco:mainfrom
AdolfCarr:fix/circuit_breaker-empty-actuator
Open

fix(cb-empty-actuator): register processPayment circuit breaker#1
AdolfCarr wants to merge 1 commit into
codingtogetherco:mainfrom
AdolfCarr:fix/circuit_breaker-empty-actuator

Conversation

@AdolfCarr

Copy link
Copy Markdown
  • 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

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant