Skip to content

Commit

Permalink
remove tracing from example
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka committed Aug 6, 2024
1 parent 2bce070 commit 5f7432e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::env;
use http_body_util::Empty;
use hyper::Request;
use hyper_util::client::legacy::{connect::HttpConnector, Client};
use tracing::{info_span, Instrument};

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
Expand All @@ -29,8 +28,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.uri(url)
.body(Empty::<bytes::Bytes>::new())?;

let span = info_span!("request", uri = %req.uri());
let resp = client.request(req).instrument(span).await?;
let resp = client.request(req).await?;

eprintln!("{:?} {:?}", resp.version(), resp.status());
eprintln!("{:#?}", resp.headers());
Expand Down

0 comments on commit 5f7432e

Please sign in to comment.