From df63b719ac4ce4d1944295c634ec73da14ae72e7 Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Sat, 18 Nov 2023 20:15:16 +0100 Subject: feat(tvix/castore): fix tracing instrument in `MemoryBlobService` Change-Id: Iedba57e8b3e1a44f14f5baa1e981275d4b02eb56 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10070 Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/castore/src/blobservice/memory.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tvix/castore') diff --git a/tvix/castore/src/blobservice/memory.rs b/tvix/castore/src/blobservice/memory.rs index 8f4e50aa37c5..0954f0adb56c 100644 --- a/tvix/castore/src/blobservice/memory.rs +++ b/tvix/castore/src/blobservice/memory.rs @@ -17,12 +17,13 @@ pub struct MemoryBlobService { #[async_trait] impl BlobService for MemoryBlobService { - #[instrument(skip(self, digest), fields(blob.digest=%digest))] + #[instrument(skip_all, ret, err, fields(blob.digest=%digest))] async fn has(&self, digest: &B3Digest) -> Result { let db = self.db.read().unwrap(); Ok(db.contains_key(digest)) } + #[instrument(skip_all, err, fields(blob.digest=%digest))] async fn open_read(&self, digest: &B3Digest) -> Result>, Error> { let db = self.db.read().unwrap(); @@ -32,7 +33,7 @@ impl BlobService for MemoryBlobService { } } - #[instrument(skip(self))] + #[instrument(skip_all)] async fn open_write(&self) -> Box { Box::new(MemoryBlobWriter::new(self.db.clone())) } -- cgit 1.4.1