mirror of
https://github.com/TrueLayer/reqwest-middleware.git
synced 2024-12-26 02:46:30 +00:00
Make clear examples are just examples (#63)
This commit is contained in:
parent
0f7c2e15fa
commit
ddd7e12104
2 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,8 @@
|
|||
//! Attach [`TracingMiddleware`] to your client to automatically trace HTTP requests.
|
||||
//!
|
||||
//! In this example we define a custom span builder to calculate the request time elapsed and we register the [`TracingMiddleware`].
|
||||
//!
|
||||
//! Note that Opentelemetry tracks start and stop already, there is no need to have a custom builder like this.
|
||||
//! ```rust
|
||||
//! use reqwest_middleware::Result;
|
||||
//! use task_local_extensions::Extensions;
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
/// # let request: &reqwest::Request = todo!();
|
||||
///
|
||||
/// // Define a `time_elapsed` field as empty. It might be populated later.
|
||||
/// // (This example is just to show how to inject data - otel already tracks durations)
|
||||
/// reqwest_otel_span!(request, time_elapsed = tracing::field::Empty);
|
||||
///
|
||||
/// // Define a `name` field with a known value, `AppName`.
|
||||
|
|
Loading…
Reference in a new issue