feat(tvix/blobservice/object_store) more logging
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
This commit is contained in:
parent
c0e16059e6
commit
05bdb68523
1 changed files with 3 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ use prost::Message;
|
||||||
use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt};
|
use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt};
|
||||||
use tokio_stream::StreamExt;
|
use tokio_stream::StreamExt;
|
||||||
use tonic::async_trait;
|
use tonic::async_trait;
|
||||||
use tracing::{debug, info, instrument, trace};
|
use tracing::{debug, info, instrument, trace, Level};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use crate::{
|
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 {
|
fn derive_blob_path(base_path: &Path, digest: &B3Digest) -> Path {
|
||||||
base_path
|
base_path
|
||||||
.child("blobs")
|
.child("blobs")
|
||||||
|
|
@ -105,6 +106,7 @@ fn derive_blob_path(base_path: &Path, digest: &B3Digest) -> Path {
|
||||||
.child(HEXLOWER.encode(digest.as_slice()))
|
.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 {
|
fn derive_chunk_path(base_path: &Path, digest: &B3Digest) -> Path {
|
||||||
base_path
|
base_path
|
||||||
.child("chunks")
|
.child("chunks")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue