spring-cloud / spring-cloud-circuitbreaker

Spring Cloud Circuit Breaker API and Implementations
Apache License 2.0
329 stars 110 forks source link

Add how to use circuit breakers to the documentation #106

Closed breun closed 3 years ago

breun commented 3 years ago

I was reading https://docs.spring.io/spring-cloud-circuitbreaker/docs/2.0.1/reference/html/ and while this documentation explains what starter to use and how to configure the circuit breakers, it doesn't explain how to actually apply a circuit breaker to a particular piece of code.

It took me a little bit to find this information on https://spring.io/projects/spring-cloud-circuitbreaker#overview I think it would be good to also include this information from the overview in the actual documentation.

ryanjbaxter commented 3 years ago

This is really the purpose of the project page and the samples linked from there.

Can I ask you how you ended up at the documentation before the project page?

https://github.com/spring-cloud-samples/spring-cloud-circuitbreaker-demo

breun commented 3 years ago

I got guess I got used to this pattern:

  1. Go to the Spring projects overview: https://spring.io/projects
  2. Find project and click the 'Learn' tab: Spring Cloud > Spring Cloud Circuit Breaker > Learn
  3. Click 'Reference Doc.' link for the version I want to read the docs for: 2.0.1

I know that I passed the overview page in this process, but I'm used to the reference documentation being the most complete documentation, instead of additional information building on what's on the project's overview page. So, I always hit the 'Learn' tab immediately to get to the reference documentation.

ryanjbaxter commented 3 years ago

Because the APIs live in Spring Cloud Commons the documentation you are expecting lives there https://docs.spring.io/spring-cloud-commons/docs/current/reference/html/#spring-cloud-circuit-breaker

breun commented 3 years ago

Ah, I wouldn't have known that docs for Spring Cloud Circuit Breaker could be found under Spring Cloud Commons.

The 'Resilience4J' and 'Spring Retry' links in the configuration section of those docs are not working by the way.

mzeijen commented 3 years ago

I too wouldn't have thought to look in the Spring Cloud Commons section for a topic that has its own documentation page. I recommend adding links to the Spring Cloud Circuit Breaker documentation or to consolidate the documentation on one place.

ryanjbaxter commented 3 years ago

Also fixed links in commons https://github.com/spring-cloud/spring-cloud-commons/commit/2341cf6ffc3e78c5cfad658e2131ff3f70012884