Skip to content

Commit

Permalink
Adjust docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Oct 24, 2023
1 parent f3fbdb5 commit c86b792
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ Its goal is to be as ergonomic as possible while doing the right thing by defaul
It is the result of years of copy-pasting the same configuration over and over again:

- Retry only on certain exceptions.
- Exponential backoff with _jitter_ between retries.
- Exponential **backoff** with **jitter** between retries.
- Limit the number of retries **and** total time.
- Automatic **async** support.
- Preserve **type hints** of the decorated callable.
- Count ([Prometheus](https://github.com/prometheus/client_python)) and log ([*structlog*](https://www.structlog.org/)) retries with basic metadata, if they're installed.
- Count ([Prometheus](https://github.com/prometheus/client_python)) and log ([*structlog*](https://www.structlog.org/) with fallback to `logging`) retries with basic metadata, if they're installed.
- Easy _global_ deactivation for testing.

For example:
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def do_it(code: int) -> httpx.Response:
This will retry the function up to 3 times if it raises an {class}`httpx.HTTPError` (or any subclass thereof).
Since retrying on {class}`Exception` is an [*attractive nuisance*](https://blog.ganssle.io/articles/2023/01/attractive-nuisances.html), *stamina* doesn't do it by default and forces you to be explicit.

To give you observability of your application's retrying, *stamina* will count the retries using [*prometheus-client*](https://github.com/prometheus/client_python) in the `stamina_retries_total` counter and log them out using [*structlog*](https://www.structlog.org/), if they're installed.
To give you observability of your application's retrying, *stamina* will count the retries using [*prometheus-client*](https://github.com/prometheus/client_python) in the `stamina_retries_total` counter (if installed) and log them out using [*structlog*](https://www.structlog.org/) with a fallback to {mod}`logging`.


## Arbitrary Code Blocks
Expand Down

0 comments on commit c86b792

Please sign in to comment.