forked from mirror/reqwest-middleware
chore: Move to task-local-extensions (#9)
* chore: Move to task-local-extensionsreqwest-tracing-0.2
parent
b8645f81eb
commit
9c82a35a90
|
@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Changed
|
||||
- Disabled default features on `reqwest`
|
||||
- Replaced `truelayer-extensions` with `task-local-extensions`
|
||||
|
||||
### Added
|
||||
- New methods on `ClientWithExtensions` and `RequestBuilder` for sending requests with initial extensions.
|
||||
|
|
|
@ -18,7 +18,7 @@ http = "0.2"
|
|||
reqwest = { version = "0.11", default-features = false, features = ["json", "multipart"] }
|
||||
serde = "1"
|
||||
thiserror = "1"
|
||||
truelayer-extensions = "0.1"
|
||||
task-local-extensions = "0.1.1"
|
||||
|
||||
[dev-dependencies]
|
||||
reqwest = "0.11"
|
||||
|
|
|
@ -6,7 +6,7 @@ use std::convert::TryFrom;
|
|||
use std::fmt::Display;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use truelayer_extensions::Extensions;
|
||||
use task_local_extensions::Extensions;
|
||||
|
||||
use crate::error::Result;
|
||||
use crate::middleware::{Middleware, Next};
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//! ```
|
||||
//! use reqwest::{Client, Request, Response};
|
||||
//! use reqwest_middleware::{ClientBuilder, Middleware, Next, Result};
|
||||
//! use truelayer_extensions::Extensions;
|
||||
//! use task_local_extensions::Extensions;
|
||||
//!
|
||||
//! struct LoggingMiddleware;
|
||||
//!
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use futures::future::{BoxFuture, FutureExt, TryFutureExt};
|
||||
use reqwest::{Client, Request, Response};
|
||||
use std::sync::Arc;
|
||||
use truelayer_extensions::Extensions;
|
||||
use task_local_extensions::Extensions;
|
||||
|
||||
use crate::error::{Error, Result};
|
||||
|
||||
|
@ -13,7 +13,7 @@ use crate::error::{Error, Result};
|
|||
/// ```
|
||||
/// use reqwest::{Client, Request, Response};
|
||||
/// use reqwest_middleware::{ClientBuilder, Middleware, Next, Result};
|
||||
/// use truelayer_extensions::Extensions;
|
||||
/// use task_local_extensions::Extensions;
|
||||
///
|
||||
/// struct TransparentMiddleware;
|
||||
///
|
||||
|
|
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Re-export `RetryPolicy` from the crate root.
|
||||
### Changed
|
||||
- Disabled default features on `reqwest`
|
||||
- Replaced `truelayer-extensions` with `task-local-extensions`
|
||||
|
||||
## [0.1.1] - 2021-09-15
|
||||
### Changed
|
||||
|
|
|
@ -21,7 +21,7 @@ retry-policies = "0.1"
|
|||
reqwest = { version = "0.11", default-features = false }
|
||||
tokio = { version = "1.6", features = ["time"] }
|
||||
tracing = "0.1.26"
|
||||
truelayer-extensions = "0.1"
|
||||
task-local-extensions = "0.1.1"
|
||||
|
||||
[dev-dependencies]
|
||||
wiremock = "0.5"
|
||||
|
|
|
@ -6,7 +6,7 @@ use chrono::Utc;
|
|||
use reqwest::{Request, Response};
|
||||
use reqwest_middleware::{Error, Middleware, Next, Result};
|
||||
use retry_policies::RetryPolicy;
|
||||
use truelayer_extensions::Extensions;
|
||||
use task_local_extensions::Extensions;
|
||||
|
||||
/// We limit the number of retries to a maximum of `10` to avoid stack-overflow issues due to the recursion.
|
||||
static MAXIMUM_NUMBER_OF_RETRIES: u32 = 10;
|
||||
|
|
|
@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Changed
|
||||
- Disabled default features on `reqwest`
|
||||
- Replaced `truelayer-extensions` with `task-local-extensions`
|
||||
|
||||
## [0.1.2] - 2021-09-15
|
||||
### Changed
|
||||
|
|
|
@ -22,7 +22,7 @@ async-trait = "0.1.51"
|
|||
reqwest = { version = "0.11", default-features = false }
|
||||
tokio = { version = "1.6", features = ["time"] }
|
||||
tracing = "0.1.26"
|
||||
truelayer-extensions = "0.1"
|
||||
task-local-extensions = "0.1.1"
|
||||
|
||||
opentelemetry_0_13_pkg = { package = "opentelemetry", version = "0.13", optional = true }
|
||||
opentelemetry_0_14_pkg = { package = "opentelemetry", version = "0.14", optional = true }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use reqwest::header::{HeaderMap, HeaderValue};
|
||||
use reqwest::{Request, Response, StatusCode as RequestStatusCode};
|
||||
use reqwest_middleware::{Error, Middleware, Next, Result};
|
||||
use truelayer_extensions::Extensions;
|
||||
use task_local_extensions::Extensions;
|
||||
|
||||
/// Middleware for tracing requests using the current Opentelemetry Context.
|
||||
pub struct TracingMiddleware;
|
||||
|
|
Loading…
Reference in New Issue