Skip to content

Commit e3895dd

Browse files
CARS-29365: fix documentation (#9)
1 parent 1e5e828 commit e3895dd

3 files changed

Lines changed: 58 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
99

10+
## [Unreleased]
11+
12+
### Documentation
13+
14+
- Updated version references in README from `0.2` to `0.3`
15+
- Fixed broken image reference in README (removed non-existent `assets/logo.png`)
16+
- Added Telemetry section to README documenting the `[:req_fuse, :blown]` event
17+
- Updated CHANGELOG with missing entries for versions 0.3.0 and 0.3.2
18+
- Fixed typo in mix.exs description (`ttps://``https://`)
19+
20+
## [0.3.2](https://github.com/carsdotcom/req_fuse/compare/0.3.0...0.3.2) - 2025-03-20
21+
22+
### Merged
23+
24+
- Update mix.lock with latest package versions [`#8`](https://github.com/carsdotcom/req_fuse/pull/8)
25+
- Bump ex_doc for fix warnings [`#7`](https://github.com/carsdotcom/req_fuse/pull/7)
26+
- Upgrade req and its dependencies [`#6`](https://github.com/carsdotcom/req_fuse/pull/6)
27+
28+
## [0.3.0](https://github.com/carsdotcom/req_fuse/compare/0.2.3...0.3.0) - 2024-04-04
29+
30+
### Merged
31+
32+
- Upgrade to Req 0.4.14 which introduces improved testing mechanism [`#5`](https://github.com/carsdotcom/req_fuse/pull/5)
33+
34+
### Commits
35+
36+
- update test setup to match Req changes [`f17e789`](https://github.com/carsdotcom/req_fuse/commit/f17e789)
37+
- update req and finch [`bb005f4`](https://github.com/carsdotcom/req_fuse/commit/bb005f4)
38+
1039
## [0.2.3](https://github.com/carsdotcom/req_fuse/compare/0.2.2...0.2.3) - 2023-04-18
1140

1241
### Commits

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# ReqFuse
22

3-
<object data="assets/logo.png" type="image/jpeg">
4-
<img src="assets/fuse.png" alt="ReqFuse fuses" />
5-
</object>
3+
<img src="assets/fuse.png" alt="ReqFuse fuses" />
64

75
ReqFuse on Github https://github.com/carsdotcom/req_fuse
86

@@ -27,7 +25,7 @@ you are passing in the required and any optional fuse configuration.
2725
```elixir
2826
Mix.install([
2927
{:req, "~> 0.3"},
30-
{:req_fuse, "~> 0.2"}
28+
{:req_fuse, "~> 0.3"}
3129
])
3230

3331
req_fuse_opts = [fuse_name: My.Example.Fuse]
@@ -51,7 +49,7 @@ by adding `req_fuse` to your list of dependencies in `mix.exs`:
5149
```elixir
5250
def deps do
5351
[
54-
{:req_fuse, ">= 0.2.0"}
52+
{:req_fuse, ">= 0.3.0"}
5553
]
5654
end
5755
```
@@ -79,6 +77,31 @@ strategies and their options.
7977

8078
See also the additional discussion on options in `ReqFuse.Steps.Fuse`
8179

80+
## Telemetry
81+
82+
ReqFuse emits telemetry events for observability:
83+
84+
### Events
85+
86+
* `[:req_fuse, :blown]` - Emitted when a request is blocked because the fuse is blown (circuit breaker is open).
87+
88+
#### Metadata
89+
90+
* `:fuse_name` - The name of the fuse that is blown.
91+
92+
### Example Handler
93+
94+
```elixir
95+
:telemetry.attach(
96+
"req-fuse-handler",
97+
[:req_fuse, :blown],
98+
fn _event, _measurements, metadata, _config ->
99+
Logger.warning("Circuit breaker open for #{inspect(metadata.fuse_name)}")
100+
end,
101+
nil
102+
)
103+
```
104+
82105
## License
83106

84107
See [LICENSE](https://github.com/carsdotcom/req_fuse/blob/main/LICENSE)

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ defmodule ReqFuse.MixProject do
4949
"""
5050
ReqFuse provides circuit-breaking functionality, using fuse, for HTTP requests that use Req.
5151
Req: https://github.com/wojtekmach/req
52-
Fuse: ttps://github.com/jlouis/fuse
52+
Fuse: https://github.com/jlouis/fuse
5353
"""
5454
end
5555

0 commit comments

Comments
 (0)