@@ -464,7 +464,10 @@ impl StacksClient {
464
464
"last_sortition" => %last_sortition,
465
465
) ;
466
466
let path = self . tenure_forking_info_path ( chosen_parent, last_sortition) ;
467
- let timer = crate :: monitoring:: new_rpc_call_timer ( & path, & self . http_origin ) ;
467
+ let timer = crate :: monitoring:: new_rpc_call_timer (
468
+ "/v3/tenures/fork_info/:start/:stop" ,
469
+ & self . http_origin ,
470
+ ) ;
468
471
let send_request = || {
469
472
self . stacks_node_client
470
473
. get ( & path)
@@ -505,7 +508,8 @@ impl StacksClient {
505
508
pub fn get_sortition ( & self , ch : & ConsensusHash ) -> Result < SortitionInfo , ClientError > {
506
509
debug ! ( "stacks_node_client: Getting sortition with consensus hash {ch}..." ) ;
507
510
let path = format ! ( "{}/consensus/{}" , self . sortition_info_path( ) , ch. to_hex( ) ) ;
508
- let timer = crate :: monitoring:: new_rpc_call_timer ( & path, & self . http_origin ) ;
511
+ let timer_label = format ! ( "{}/consensus/:consensus_hash" , self . sortition_info_path( ) ) ;
512
+ let timer = crate :: monitoring:: new_rpc_call_timer ( & timer_label, & self . http_origin ) ;
509
513
let send_request = || {
510
514
self . stacks_node_client . get ( & path) . send ( ) . map_err ( |e| {
511
515
warn ! ( "Signer failed to request sortition" ; "consensus_hash" => %ch, "err" => ?e) ;
@@ -575,7 +579,7 @@ impl StacksClient {
575
579
) -> Result < Option < Vec < NakamotoSignerEntry > > , ClientError > {
576
580
debug ! ( "stacks_node_client: Getting reward set signers for reward cycle {reward_cycle}..." ) ;
577
581
let timer = crate :: monitoring:: new_rpc_call_timer (
578
- & self . reward_set_path ( reward_cycle) ,
582
+ & format ! ( "{}/v3/stacker_set/: reward_cycle" , self . http_origin ) ,
579
583
& self . http_origin ,
580
584
) ;
581
585
let send_request = || {
@@ -658,8 +662,8 @@ impl StacksClient {
658
662
address : & StacksAddress ,
659
663
) -> Result < AccountEntryResponse , ClientError > {
660
664
debug ! ( "stacks_node_client: Getting account info..." ) ;
661
- let timer =
662
- crate :: monitoring:: new_rpc_call_timer ( & self . accounts_path ( address ) , & self . http_origin ) ;
665
+ let timer_label = format ! ( "{}/v2/accounts/:principal" , self . http_origin ) ;
666
+ let timer = crate :: monitoring:: new_rpc_call_timer ( & timer_label , & self . http_origin ) ;
663
667
let send_request = || {
664
668
self . stacks_node_client
665
669
. get ( self . accounts_path ( address) )
@@ -811,7 +815,11 @@ impl StacksClient {
811
815
let body =
812
816
json ! ( { "sender" : self . stacks_address. to_string( ) , "arguments" : args} ) . to_string ( ) ;
813
817
let path = self . read_only_path ( contract_addr, contract_name, function_name) ;
814
- let timer = crate :: monitoring:: new_rpc_call_timer ( & path, & self . http_origin ) ;
818
+ let timer_label = format ! (
819
+ "{}/v2/contracts/call-read/:principal/{contract_name}/{function_name}" ,
820
+ self . http_origin
821
+ ) ;
822
+ let timer = crate :: monitoring:: new_rpc_call_timer ( & timer_label, & self . http_origin ) ;
815
823
let response = self
816
824
. stacks_node_client
817
825
. post ( path)
0 commit comments