From 7611ac3b4a30fd60f99483881c24ed3787083ad1 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 22 May 2024 00:00:00 +0000 Subject: [PATCH] =?UTF-8?q?view:=20=F0=9F=A7=BF=20add=20trace=20spans=20to?= =?UTF-8?q?=20`ViewService`=20methods?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit these are useful for the sake of following the sequence of function calls when debugging issues related to the view server, the view server worker, and integration tests making use of the `Planner`. x-ref: #3913 --- crates/view/src/service.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/crates/view/src/service.rs b/crates/view/src/service.rs index 173c9a55e3..cb2ea54a54 100644 --- a/crates/view/src/service.rs +++ b/crates/view/src/service.rs @@ -401,6 +401,7 @@ impl ViewService for ViewServer { type AuctionsStream = Pin> + Send>>; + #[instrument(skip_all, level = "trace")] async fn auctions( &self, request: tonic::Request, @@ -469,6 +470,7 @@ impl ViewService for ViewServer { Ok(Response::new(stream)) } + #[instrument(skip_all, level = "trace")] async fn broadcast_transaction( &self, request: tonic::Request, @@ -489,6 +491,7 @@ impl ViewService for ViewServer { Ok(tonic::Response::new(stream)) } + #[instrument(skip_all, level = "trace")] async fn transaction_planner( &self, request: tonic::Request, @@ -760,6 +763,7 @@ impl ViewService for ViewServer { })) } + #[instrument(skip_all, level = "trace")] async fn address_by_index( &self, request: tonic::Request, @@ -783,6 +787,7 @@ impl ViewService for ViewServer { })) } + #[instrument(skip_all, level = "trace")] async fn index_by_address( &self, request: tonic::Request, @@ -806,6 +811,7 @@ impl ViewService for ViewServer { })) } + #[instrument(skip_all, level = "trace")] async fn ephemeral_address( &self, request: tonic::Request, @@ -829,6 +835,7 @@ impl ViewService for ViewServer { })) } + #[instrument(skip_all, level = "trace")] async fn transaction_info_by_hash( &self, request: tonic::Request, @@ -1012,6 +1019,7 @@ impl ViewService for ViewServer { Ok(tonic::Response::new(response)) } + #[instrument(skip_all, level = "trace")] async fn swap_by_commitment( &self, request: tonic::Request, @@ -1137,6 +1145,7 @@ impl ViewService for ViewServer { )) } + #[instrument(skip_all, level = "trace")] async fn note_by_commitment( &self, request: tonic::Request, @@ -1167,6 +1176,7 @@ impl ViewService for ViewServer { })) } + #[instrument(skip_all, level = "trace")] async fn nullifier_status( &self, request: tonic::Request, @@ -1190,6 +1200,7 @@ impl ViewService for ViewServer { })) } + #[instrument(skip_all, level = "trace")] async fn status( &self, _: tonic::Request, @@ -1201,6 +1212,7 @@ impl ViewService for ViewServer { })?)) } + #[instrument(skip_all, level = "trace")] async fn status_stream( &self, _: tonic::Request, @@ -1233,6 +1245,7 @@ impl ViewService for ViewServer { Ok(tonic::Response::new(stream.boxed())) } + #[instrument(skip_all, level = "trace")] async fn notes( &self, request: tonic::Request, @@ -1284,6 +1297,7 @@ impl ViewService for ViewServer { )) } + #[instrument(skip_all, level = "trace")] async fn notes_for_voting( &self, request: tonic::Request, @@ -1324,6 +1338,7 @@ impl ViewService for ViewServer { )) } + #[instrument(skip_all, level = "trace")] async fn assets( &self, request: tonic::Request, @@ -1392,6 +1407,7 @@ impl ViewService for ViewServer { )) } + #[instrument(skip_all, level = "trace")] async fn transaction_info( &self, request: tonic::Request, @@ -1439,6 +1455,7 @@ impl ViewService for ViewServer { )) } + #[instrument(skip_all, level = "trace")] async fn witness( &self, request: tonic::Request, @@ -1519,6 +1536,7 @@ impl ViewService for ViewServer { Ok(tonic::Response::new(witness_response)) } + #[instrument(skip_all, level = "trace")] async fn witness_and_build( &self, request: tonic::Request, @@ -1585,6 +1603,7 @@ impl ViewService for ViewServer { )) } + #[instrument(skip_all, level = "trace")] async fn app_parameters( &self, _request: tonic::Request, @@ -1603,6 +1622,7 @@ impl ViewService for ViewServer { Ok(tonic::Response::new(response)) } + #[instrument(skip_all, level = "trace")] async fn gas_prices( &self, _request: tonic::Request, @@ -1622,6 +1642,7 @@ impl ViewService for ViewServer { Ok(tonic::Response::new(response)) } + #[instrument(skip_all, level = "trace")] async fn fmd_parameters( &self, _request: tonic::Request, @@ -1640,6 +1661,7 @@ impl ViewService for ViewServer { Ok(tonic::Response::new(response)) } + #[instrument(skip_all, level = "trace")] async fn owned_position_ids( &self, request: tonic::Request, @@ -1686,6 +1708,7 @@ impl ViewService for ViewServer { )) } + #[instrument(skip_all, level = "trace")] async fn authorize_and_build( &self, _request: tonic::Request, @@ -1693,6 +1716,7 @@ impl ViewService for ViewServer { unimplemented!("authorize_and_build") } + #[instrument(skip_all, level = "trace")] async fn unclaimed_swaps( &self, _: tonic::Request, @@ -1720,6 +1744,7 @@ impl ViewService for ViewServer { )) } + #[instrument(skip_all, level = "trace")] async fn wallet_id( &self, _: Request, @@ -1733,6 +1758,7 @@ impl ViewService for ViewServer { })) } + #[instrument(skip_all, level = "trace")] async fn asset_metadata_by_id( &self, request: Request, @@ -1755,6 +1781,7 @@ impl ViewService for ViewServer { })) } + #[instrument(skip_all, level = "trace")] async fn delegations_by_address_index( &self, _request: tonic::Request, @@ -1762,6 +1789,7 @@ impl ViewService for ViewServer { unimplemented!("delegations_by_address_index") } + #[instrument(skip_all, level = "trace")] async fn unbonding_tokens_by_address_index( &self, _request: tonic::Request,