about summary refs log tree commit diff
path: root/tvix/castore
diff options
context:
space:
mode:
authorRyan Lahfa <tvl@lahfa.xyz>2023-11-18T19·15+0100
committerraitobezarius <tvl@lahfa.xyz>2023-11-18T19·23+0000
commitdf63b719ac4ce4d1944295c634ec73da14ae72e7 (patch)
tree53751e73b2f73ef241a68c39389876e755229391 /tvix/castore
parent68e473ed6b918df8dba800aa8ae0e01543be4049 (diff)
feat(tvix/castore): fix tracing instrument in `MemoryBlobService` r/7027
Change-Id: Iedba57e8b3e1a44f14f5baa1e981275d4b02eb56
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10070
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/castore')
-rw-r--r--tvix/castore/src/blobservice/memory.rs5
1 files changed, 3 insertions, 2 deletions
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<bool, Error> {
         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<Option<Box<dyn BlobReader>>, 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<dyn BlobWriter> {
         Box::new(MemoryBlobWriter::new(self.db.clone()))
     }