feat(tvix/castore/directory/grpc): instrument functions

Change-Id: I9cc0a6a32184773597556ab5f9250257aa18ca4e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11399
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2024-04-12 20:19:06 +03:00 committed by clbot
parent f8800ba189
commit 7bcb896e48

View file

@ -34,6 +34,7 @@ impl GRPCDirectoryService {
#[async_trait]
impl DirectoryService for GRPCDirectoryService {
#[instrument(level = "trace", skip_all, fields(directory.digest = %digest))]
async fn get(
&self,
digest: &B3Digest,
@ -82,6 +83,7 @@ impl DirectoryService for GRPCDirectoryService {
}
}
#[instrument(level = "trace", skip_all, fields(directory.digest = %directory.digest()))]
async fn put(&self, directory: crate::proto::Directory) -> Result<B3Digest, crate::Error> {
let resp = self
.grpc_client
@ -101,7 +103,7 @@ impl DirectoryService for GRPCDirectoryService {
}
}
#[instrument(skip_all, fields(directory.digest = %root_directory_digest))]
#[instrument(level = "trace", skip_all, fields(directory.digest = %root_directory_digest))]
fn get_recursive(
&self,
root_directory_digest: &B3Digest,