Update example in tracing README (#76)

pull/75/head
John Vandenberg 2022-11-23 15:39:54 +08:00 committed by GitHub
parent 289bb0452c
commit a7f9a112ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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) {