Commit graph

154 commits

Author SHA1 Message Date
Simen Bekkhus
8a494c1657
feat: support OTel 0.27 (#201)
* feat: support OTel 0.27

* tracer no longer a builder

* typ0
2024-11-18 11:16:33 +00:00
Alexander Kjäll
88d2743ee1
Update version number in example to 0.6 (#197)
* Update version number in example to 0.6

* Update README.md

* Update README.md

---------

Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
2024-11-12 13:25:01 +00:00
konsti
9ea95201d0
Release new versions (#198)
Hi,

I'd like to ask for new releases for the middleware crates: reqwest-middleware 0.4.0, reqwest-retry 0.7.0 and reqwest-tracing 0.5.4.

In [uv](https://github.com/astral-sh/uv), we're currently using a git dependency for https://github.com/TrueLayer/reqwest-middleware/pull/159, and we'd like to move to a crates.io dependency (https://github.com/astral-sh/uv/issues/8932).

I've bump reqwest-middleware and reqwest-retry according to being breaking changes in the error type, while requiring reqwest-middleware `>0.3.0, <0.5.0` in reqwest-retry and reqwest-tracing for minimal downstream disruption.
2024-11-11 18:24:20 +00:00
Ethan Brierley
4e856602f6
refactor: fix clippy::single_match (#194) 2024-10-18 14:46:47 +01:00
Ethan Brierley
d95ec5a99f
ci: move away from deprecated actions-rs/toolchain (#193)
Thanks for the suggestion @tl-eirik-albrigtsen

              this is deprecated;
```suggestion
      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable

```

_Originally posted by @tl-eirik-albrigtsen in https://github.com/TrueLayer/reqwest-middleware/pull/192#discussion_r1804396867_
2024-10-17 20:06:35 +01:00
Ethan Brierley
b8069e2d21
ci: split feature powerset job per crate (#192)
The current job takes too long and fails due to the exponential growth caused by new features introduced in https://github.com/TrueLayer/reqwest-middleware/pull/188
2024-10-17 11:31:38 +01:00
Ethan Brierley
6d14d78d7a
refactor: fix clippy::needless_borrows_for_generic_args (#190) 2024-10-17 09:53:04 +01:00
Ethan Brierley
28a13232c0
docs: fix spelling clonable -> cloneable (#191) 2024-10-17 09:52:55 +01:00
Simen Bekkhus
e7fcd56b12
feat: Support OTel 0.25 & 0.26 (#188)
* feat: Support OTel 0.25

* feat: Support OTel 0.26
2024-10-16 21:05:35 +01:00
Alexander Kjäll
fc89e7ddb7
the example in the readme didn't compile (#189) 2024-10-16 20:25:08 +01:00
konsti
680741faf1
Add retries to error message (#159)
Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
2024-10-16 20:20:48 +01:00
Collin Styles
cf06f0962a
Use new matchit syntax in documentation (#181)
* Use new matchit syntax in documentation

* Fix link in GitHub pull request template
2024-08-28 22:37:51 +01:00
Piotr Zaczkowski
211a6dea9f Code review suggestions 2024-08-28 22:37:06 +01:00
Piotr Zaczkowski
d5290d056f Simplify 2024-08-28 22:37:06 +01:00
Piotr Zaczkowski
d966ad89e5 Fix empty and different level naming 2024-08-28 22:37:06 +01:00
Piotr Zaczkowski
4ea0e42bcd Correct use 2024-08-28 22:37:06 +01:00
Piotr Zaczkowski
939681cd93 WIP... 2024-08-28 22:37:06 +01:00
Tom Finlayson
6cd4eb93f8 docs: add CHANGELOG entry 2024-08-22 16:14:38 +01:00
Tom Finlayson
3ddfded9e3 fix: restore adding http.url as an attribute when deprecated_attributes feature is enabled 2024-08-22 16:14:38 +01:00
Ethan Brierley
603ef97144 chore: prepare release 🚀
Prepare release of:
- reqwest-middleware 0.3.2 -> 0.3.3
- reqwest-tracing 0.5.2 -> 0.5.3
- reqwest-retry 0.6.0 -> 0.6.1
2024-08-09 09:17:32 +01:00
Thomas Nicollet
47f52327e8
Added Default derive to allow for same functionality as base type (#179) 2024-08-05 18:47:13 +00:00
David Mládek
053d329e8b
OpenTelemetry 0.24 support (#171)
* feat: support opentelemetry 0.24

* minor fix

* Fix opentelemetry 0.24 by upgrading tracing-opentelemetry to 0.25

---------

Co-authored-by: Aitor Fernandez <aitor.fernandez@truelayer.com>
Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
2024-07-30 09:46:19 +01:00
Ethan Brierley
730c402420 ci: use cargo hack feature powerset in CI
waiting on #175 & #176 to fix issues with the build

Recently a [change was introduced that did not compile](4a2b3f335e (r1689595502)) #167.

This was not caught by our CI becuase the feature was not enabled when building in CI.

This change ensures that every possible feature combination is attempted when running tests and clippy in CI. This adds up to 50 attempts for all of our features accross the three crates in this repo. This doesn't take too long since they share build cache.
2024-07-29 20:43:49 +01:00
Ethan Brierley
ceeb058502 fix(test): enable rustls-tls for tests
This is helpful for [this test](c90089ebd4/reqwest-middleware/src/lib.rs (L8)).

This enables tests to pass when running `cargo test --no-default-features`.
2024-07-29 20:33:58 +01:00
Ethan Brierley
c54a7733b9 fix(lint): clippy::doc_lazy_continuation
```
error: doc list item missing indentation
Error:   --> reqwest-retry/src/middleware.rs:62:4
   |
62 | /// `Body`'s `From<String>` or `From<Bytes>` implementations.
   |    ^
   |
   = help: if this is supposed to be its own paragraph, add a blank line
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
   = note: `-D clippy::doc-lazy-continuation` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::doc_lazy_continuation)]`
help: indent this line
   |
62 | ///   `Body`'s `From<String>` or `From<Bytes>` implementations.
   |     ++

error: doc list item missing indentation
Error:   --> reqwest-retry/src/middleware.rs:65:4
   |
65 | /// source directly, avoiding the issue of streaming requests not being clonable.
   |    ^
   |
   = help: if this is supposed to be its own paragraph, add a blank line
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
   |
65 | ///   source directly, avoiding the issue of streaming requests not being clonable.
   |     ++

error: could not compile `reqwest-retry` (lib) due to 2 previous errors
```
2024-07-29 20:28:02 +01:00
Aitor Fernández
c90089ebd4
fix: user-agent (#172)
* fix: user-agent

* add deprecated_attributes on actions

* add package-name/feature-name for visibility
2024-07-29 18:47:29 +01:00
Piotr Zaczkowski
33421175a8
Remove superfluous dependency to chrono (#170) 2024-07-23 11:15:17 +01:00
Aitor Fernández
4ce811911b
Add feature flag for deprecated fields (#167)
* Add feature flag for deprecated fields

* revert editor format

* rename flag

* remove unnecessary cfg not

* add comment and publish old and new attributes on request_span macro

* add comment

* update changelog

* Update reqwest-tracing/CHANGELOG.md

Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>

* bump version

---------

Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
2024-07-15 11:53:31 +01:00
Ethan Brierley
cb2121478a
chore: remove reqwest-middleware changelog from root (#166)
To be consistent with the other crates in this repo
2024-06-28 10:51:33 +01:00
Ethan Brierley
f8c3e487de
chore: prepare release 🚀 (#165)
* chore: bump minor version for `reqwest-retry`

Breaking change introduced in https://github.com/TrueLayer/reqwest-middleware/pull/155

* chore: bump patch version for `reqwest-middlware`

* fix: `opentelemetry` item in wrong changelog

* chore: bump patch version for `reqwest-tracing`
2024-06-28 10:43:04 +01:00
Matt Palmer
524e044fd7
Re-export reqwest crate (#158)
* Re-export reqwest crate

In a large project, it's not unheard of for multiple mutually-incompatible versions of a major crate like `reqwest` to end up in the mix.  By re-exporting the version of `reqwest` used by `reqwest-middleware`, we can be sure we're referring to the *correct* `reqwest`, rather than some other, incompatible, `reqwest`.

* Update CHANGELOG.md

---------

Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
2024-06-26 20:35:44 +01:00
Matt Palmer
226562735c
Expose some more reqwest features (#160) 2024-06-25 10:20:53 +01:00
Marcus Griep
88dbfe67fb
feat: support opentelemetry 0.23 (#156) 2024-06-03 10:12:56 +01:00
pvichivanives
2927624652
Bump retry-policies to 0.4 (#155)
* bump reqwest to 0.4

* Update reqwest-retry/src/middleware.rs

Co-authored-by: Chris Beck <5683852+cbeck88@users.noreply.github.com>

* fix unwrap issue

---------

Co-authored-by: Chris Beck <5683852+cbeck88@users.noreply.github.com>
Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
2024-06-01 02:02:26 +01:00
Chris Beck
3ae02fcd8b
add re-exports from retry-policies crate (#157)
fixes #84
2024-06-01 01:57:43 +01:00
Ethan Brierley
620b089db1 chore: release minor reqwest-middleware 🚀 2024-05-07 11:53:24 +01:00
Stefan Adrian Danaita
fa84b1fd41 [BOT-272] Function description update 2024-05-07 11:39:49 +01:00
Stefan Adrian Danaita
7dc0560d38 [BOT-272] Change function from ::extend to ::from_client 2024-05-07 11:39:49 +01:00
Stefan Adrian Danaita
8d394a964a [BOT-272] Fmt 2024-05-07 11:39:49 +01:00
Stefan Adrian Danaita
d406eb2ce7 [BOT-272] ClientBuilder extend convenience function 2024-05-07 11:39:49 +01:00
Eirik Albrigtsen
c558e7414a
main changelog entries
Signed-off-by: Eirik Albrigtsen <eirik.albrigtsen@truelayer.com>
2024-04-26 13:58:01 +01:00
Luca Palmieri
9ac5f691bf
Fix logging of User-Agent header in reqwest-tracing (#148) 2024-04-26 13:54:35 +01:00
Ben Beasley
1954b5c94f
Fix missing LICENSE-* files in released crates (#147)
* Fix missing LICENSE-* files in released crates

* Changelog: Included license files in crates
2024-04-26 13:53:50 +01:00
Simon
abdf1844c3
feat(reqwest-retry): Configurable log level for retry event (#137)
* Make retry log level configurable

* Add Changelog entry

* Update macro

* Add comment with issue to macro

* Update CHANGELOG
2024-04-11 10:16:33 +01:00
Eirik Albrigtsen
24c277a763 Document breaking feature removal for reqwest-middleware
for #144
will edit the release object if accepted

Signed-off-by: Eirik Albrigtsen <eirik.albrigtsen@truelayer.com>
2024-04-10 14:26:14 +01:00
Ethan Brierley
d2286b5e79 fix: Remove full url from default span & http.url -> url.full in SpanBackendWithUrl 2024-04-10 09:55:52 +01:00
Ethan Brierley
d401fc52e7 chore: remove deprecated items (we're making a breaking change anyway) 2024-04-10 09:55:52 +01:00
Ethan Brierley
09189ab63e fix: test compilation 2024-04-10 09:55:52 +01:00
Christopher Serr
3422e7338c Match stable Semantic Conventions for HTTP Spans
The stable [Semantic Conventions for HTTP
Spans](https://opentelemetry.io/docs/specs/semconv/http/http-spans/) use
different keys than the ones used in this crate. This changes them to
match the keys as defined by the stable specification.
2024-04-10 09:55:52 +01:00
Ethan Brierley
94a38211f7
feat!: prepare breaking release (#143) 2024-04-10 09:55:41 +01:00