mirror of
https://github.com/TrueLayer/reqwest-middleware.git
synced 2024-12-27 03:16:32 +00:00
Update example in tracing README (#76)
This commit is contained in:
parent
289bb0452c
commit
a7f9a112ed
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ pub struct TimeTrace;
|
||||||
impl ReqwestOtelSpanBackend for TimeTrace {
|
impl ReqwestOtelSpanBackend for TimeTrace {
|
||||||
fn on_request_start(req: &Request, extension: &mut Extensions) -> Span {
|
fn on_request_start(req: &Request, extension: &mut Extensions) -> Span {
|
||||||
extension.insert(Instant::now());
|
extension.insert(Instant::now());
|
||||||
reqwest_otel_span!(req, time_elapsed = tracing::field::Empty)
|
reqwest_otel_span!(name="example-request", req, time_elapsed = tracing::field::Empty)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_request_end(span: &Span, outcome: &Result<Response>, extension: &mut Extensions) {
|
fn on_request_end(span: &Span, outcome: &Result<Response>, extension: &mut Extensions) {
|
||||||
|
|
Loading…
Reference in a new issue