From ed2c0be9200c0efc7c397843a07bd90dd8d5a364 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 12 May 2024 10:29:58 +0300 Subject: feat(tvix/store/pathinfo/*): add more instrumentation Add instrumentation to the get() and put() implementations of all PathInfoService. Use the nixbase32 representation of the digest, not the base64 one. Change-Id: Iea79bbd363bf20f23985e877c6fc1793bbee6a7e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11630 Reviewed-by: picnoir picnoir Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/store/src/pathinfoservice/sled.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tvix/store/src/pathinfoservice/sled.rs') diff --git a/tvix/store/src/pathinfoservice/sled.rs b/tvix/store/src/pathinfoservice/sled.rs index 876155b115e8..eb3cf2ff1b88 100644 --- a/tvix/store/src/pathinfoservice/sled.rs +++ b/tvix/store/src/pathinfoservice/sled.rs @@ -1,8 +1,8 @@ use super::PathInfoService; use crate::proto::PathInfo; use async_stream::try_stream; -use data_encoding::BASE64; use futures::stream::BoxStream; +use nix_compat::nixbase32; use prost::Message; use std::path::Path; use tonic::async_trait; @@ -38,7 +38,7 @@ impl SledPathInfoService { #[async_trait] impl PathInfoService for SledPathInfoService { - #[instrument(level = "trace", skip_all, fields(path_info.digest = BASE64.encode(&digest)))] + #[instrument(level = "trace", skip_all, fields(path_info.digest = nixbase32::encode(&digest)))] async fn get(&self, digest: [u8; 20]) -> Result, Error> { let resp = tokio::task::spawn_blocking({ let db = self.db.clone(); -- cgit 1.4.1