From df88660b9ee844521d6a6b5d7edf4a5b079ab589 Mon Sep 17 00:00:00 2001 From: asonix Date: Fri, 22 Dec 2023 13:58:05 -0600 Subject: [PATCH] Lower priority of some object storage spans --- src/store/object_store.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/store/object_store.rs b/src/store/object_store.rs index 402051f..53f3c82 100644 --- a/src/store/object_store.rs +++ b/src/store/object_store.rs @@ -167,7 +167,7 @@ fn payload_to_io_error(e: reqwest::Error) -> std::io::Error { std::io::Error::new(std::io::ErrorKind::Other, e.to_string()) } -#[tracing::instrument(skip(stream))] +#[tracing::instrument(level = "debug", skip(stream))] async fn read_chunk(stream: &mut S) -> Result where S: Stream> + Unpin + 'static, @@ -177,8 +177,8 @@ where let mut stream = stream.into_streamer(); while buf.len() < CHUNK_SIZE { - if let Some(res) = stream.next().await { - buf.add_bytes(res?) + if let Some(bytes) = stream.try_next().await? { + buf.add_bytes(bytes) } else { break; } @@ -603,7 +603,7 @@ impl ObjectStore { let length = buf.len(); - let hashing_span = tracing::info_span!("Hashing request body"); + let hashing_span = tracing::debug_span!("Hashing request body"); let hash_string = actix_web::web::block(move || { let guard = hashing_span.enter(); let mut hasher = md5::Md5::new();