question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CircuitBreakerEvents not Publishing to CircuitBreakerEvents Endpoint.

See original GitHub issue

After configuring the spring property management.endpoint.circuitbreakerevents.enabled=true there is no output on either success or error events.

Here are my configuration properties for test…

...
management.endpoints.web.base-path=/server
management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always
management.health.defaults.enabled=true
management.health.circuitbreakers.enabled=true
management.endpoint.circuitbreakerevents.enabled=true
management.metrics.distribution.percentiles-histogram.http.server.requests= true
management.metrics.distribution.percentiles-histogram.resilience4j.circuitbreaker.calls= true

//wcw service config
resilience4j.circuitbreaker.backends.wcw.register-health-indicator=true
resilience4j.circuitbreaker.backends.wcw.sliding-window-size=10
resilience4j.circuitbreaker.backends.wcw.permitted-number-of-calls-in-half-open-state=30
resilience4j.circuitbreaker.backends.wcw.sliding-window-type=count_based
resilience4j.circuitbreaker.backends.wcw.wait-duration-in-open-state=1s
resilience4j.circuitbreaker.backends.wcw.minimum-number-of-calls=100
resilience4j.circuitbreaker.backends.wcw.slow-call-duration-threshold=60
resilience4j.circuitbreaker.backends.wcw.failure-rate-threshold=50
resilience4j.circuitbreaker.backends.wcw.event-consumer-buffer-size=10
resilience4j.circuitbreaker.backends.wcw.writable-stack-trace-enabled=true

resilience4j.circuitbreaker.backends.wcw.record-exceptions=org.springframework.ws.client.WebServiceIOException
resilience4j.circuitbreaker.backends.wcw.ignore-exceptions=

The output for the endpoint config at /server/circuitbreakers shows status up and working…

{
  circuitBreakers: [
  "wcw"
  ]
}

A MockMVC Response confirms the the CircuitBreaker recorded a failed event. However, the ouput at /server/circuitbreakerevents/wcw is empty.

[2019-09-30 18:27:04.152] [DEBUG] [PID: 17144] :: [CID: ] :: [main] [tBreakerStateMachine] :: Event ERROR published: 2019-09-30T18:27:04.151-05:00[America/Chicago]: CircuitBreaker 'wcw' recorded an error: 'org.springframework.ws.client.WebServiceIOException: I/O error: Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused: connect'. Elapsed time: 2240 ms
{
   circuitBreakerEvents: [ ]
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
edwardbeckettcommented, Oct 1, 2019

Ah… yes… You’re running with WebEnvironment.RANDOM_PORT and I’m running the tests with WebEnvironment.MOCK with the main application running so that would explain the difference.

Thank you for the excellent assistance @RobWin … I would consider this resolved.

The events are registering during runtime…

events_working

1reaction
RobWincommented, Oct 1, 2019

Endpoint works for me:

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Registred CircuitBreakerHealthIndicator are not showing in ...
I am using default health endpoint and by the time it's initialized the circuit health indicators are not created yet and thus are...
Read more >
Spring Boot 2 - Actuator Metrics Endpoint not working
To make an actuator endpoint available via HTTP, it needs to be both enabled and exposed. By default: only the /health and /info...
Read more >
Getting Started - resilience4j
CircuitBreaker, Retry, RateLimiter and Bulkhead Metrics are automatically published on the Metrics endpoint. To retrieve the names of the available metrics, ...
Read more >
io.github.resilience4j.circuitbreaker.event.CircuitBreakerEvent ...
Fake signature of an existing Java class. Runnable (java.lang). Represents a command that can be executed. Often used to run code in a...
Read more >
Resilience4j Session-7 Monitoring CircuitBreaker Events with ...
In this tutorial we are going to learn how to monitor events that are generated by Resilience4j library and visualize them in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found