diff options
author | Florian Klink <flokli@flokli.de> | 2024-03-11T16·20+0200 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2024-03-18T16·10+0000 |
commit | 05bdb6852384f622071aefa070dd602ddb67ee45 (patch) | |
tree | c3add565cfd77a14670cda688a452eda52975901 | |
parent | c0e16059e6198411f6d60bafa6a06a1e86332858 (diff) |
feat(tvix/blobservice/object_store) more logging r/7724
Have derive_{blob,chunk}_path emit trace-level events for both the values they're called with, as well as the return value. With RUST_LOG in place, it doesn't get lost in other unrelated noise. Change-Id: Id2451e3657324eff482841eb26a22d19e22bde30 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11136 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
-rw-r--r-- | tvix/castore/src/blobservice/object_store.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/castore/src/blobservice/object_store.rs b/tvix/castore/src/blobservice/object_store.rs index 3adcd7850e65..0dba19ef54bb 100644 --- a/tvix/castore/src/blobservice/object_store.rs +++ b/tvix/castore/src/blobservice/object_store.rs @@ -14,7 +14,7 @@ use prost::Message; use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt}; use tokio_stream::StreamExt; use tonic::async_trait; -use tracing::{debug, info, instrument, trace}; +use tracing::{debug, info, instrument, trace, Level}; use url::Url; use crate::{ @@ -97,6 +97,7 @@ impl ObjectStoreBlobService { } } +#[instrument(level=Level::TRACE, skip_all,fields(base_path=%base_path,blob.digest=%digest),ret(Display))] fn derive_blob_path(base_path: &Path, digest: &B3Digest) -> Path { base_path .child("blobs") @@ -105,6 +106,7 @@ fn derive_blob_path(base_path: &Path, digest: &B3Digest) -> Path { .child(HEXLOWER.encode(digest.as_slice())) } +#[instrument(level=Level::TRACE, skip_all,fields(base_path=%base_path,chunk.digest=%digest),ret(Display))] fn derive_chunk_path(base_path: &Path, digest: &B3Digest) -> Path { base_path .child("chunks") |