@@ -323,8 +323,10 @@ impl StacksClient {
323
323
block,
324
324
chain_id : self . chain_id ,
325
325
} ;
326
- let timer =
327
- crate :: monitoring:: new_rpc_call_timer ( & self . block_proposal_path ( ) , & self . http_origin ) ;
326
+ let timer = crate :: monitoring:: actions:: new_rpc_call_timer (
327
+ & self . block_proposal_path ( ) ,
328
+ & self . http_origin ,
329
+ ) ;
328
330
let send_request = || {
329
331
self . stacks_node_client
330
332
. post ( self . block_proposal_path ( ) )
@@ -399,7 +401,8 @@ impl StacksClient {
399
401
"{}{RPC_TENURE_FORKING_INFO_PATH}/:start/:stop" ,
400
402
self . http_origin
401
403
) ;
402
- let timer = crate :: monitoring:: new_rpc_call_timer ( & metrics_path, & self . http_origin ) ;
404
+ let timer =
405
+ crate :: monitoring:: actions:: new_rpc_call_timer ( & metrics_path, & self . http_origin ) ;
403
406
let send_request = || {
404
407
self . stacks_node_client
405
408
. get ( & path)
@@ -420,7 +423,7 @@ impl StacksClient {
420
423
pub fn get_current_and_last_sortition ( & self ) -> Result < CurrentAndLastSortition , ClientError > {
421
424
debug ! ( "StacksClient: Getting current and prior sortition" ) ;
422
425
let path = format ! ( "{}/latest_and_last" , self . sortition_info_path( ) ) ;
423
- let timer = crate :: monitoring:: new_rpc_call_timer ( & path, & self . http_origin ) ;
426
+ let timer = crate :: monitoring:: actions :: new_rpc_call_timer ( & path, & self . http_origin ) ;
424
427
let send_request = || {
425
428
self . stacks_node_client . get ( & path) . send ( ) . map_err ( |e| {
426
429
warn ! ( "Signer failed to request latest sortition" ; "err" => ?e) ;
@@ -460,8 +463,10 @@ impl StacksClient {
460
463
/// Get the current peer info data from the stacks node
461
464
pub fn get_peer_info ( & self ) -> Result < PeerInfo , ClientError > {
462
465
debug ! ( "StacksClient: Getting peer info" ) ;
463
- let timer =
464
- crate :: monitoring:: new_rpc_call_timer ( & self . core_info_path ( ) , & self . http_origin ) ;
466
+ let timer = crate :: monitoring:: actions:: new_rpc_call_timer (
467
+ & self . core_info_path ( ) ,
468
+ & self . http_origin ,
469
+ ) ;
465
470
let send_request = || {
466
471
self . stacks_node_client
467
472
. get ( self . core_info_path ( ) )
@@ -485,7 +490,7 @@ impl StacksClient {
485
490
debug ! ( "StacksClient: Getting reward set signers" ;
486
491
"reward_cycle" => reward_cycle,
487
492
) ;
488
- let timer = crate :: monitoring:: new_rpc_call_timer (
493
+ let timer = crate :: monitoring:: actions :: new_rpc_call_timer (
489
494
& format ! ( "{}/v3/stacker_set/:reward_cycle" , self . http_origin) ,
490
495
& self . http_origin ,
491
496
) ;
@@ -521,7 +526,8 @@ impl StacksClient {
521
526
/// Retrieve the current pox data from the stacks node
522
527
pub fn get_pox_data ( & self ) -> Result < RPCPoxInfoData , ClientError > {
523
528
debug ! ( "StacksClient: Getting pox data" ) ;
524
- let timer = crate :: monitoring:: new_rpc_call_timer ( & self . pox_path ( ) , & self . http_origin ) ;
529
+ let timer =
530
+ crate :: monitoring:: actions:: new_rpc_call_timer ( & self . pox_path ( ) , & self . http_origin ) ;
525
531
let send_request = || {
526
532
self . stacks_node_client
527
533
. get ( self . pox_path ( ) )
@@ -572,7 +578,7 @@ impl StacksClient {
572
578
"address" => %address,
573
579
) ;
574
580
let timer_label = format ! ( "{}/v2/accounts/:principal" , self . http_origin) ;
575
- let timer = crate :: monitoring:: new_rpc_call_timer ( & timer_label, & self . http_origin ) ;
581
+ let timer = crate :: monitoring:: actions :: new_rpc_call_timer ( & timer_label, & self . http_origin ) ;
576
582
let send_request = || {
577
583
self . stacks_node_client
578
584
. get ( self . accounts_path ( address) )
@@ -628,7 +634,7 @@ impl StacksClient {
628
634
"block_height" => %block. header. chain_length,
629
635
) ;
630
636
let path = format ! ( "{}{}?broadcast=1" , self . http_origin, postblock_v3:: PATH ) ;
631
- let timer = crate :: monitoring:: new_rpc_call_timer ( & path, & self . http_origin ) ;
637
+ let timer = crate :: monitoring:: actions :: new_rpc_call_timer ( & path, & self . http_origin ) ;
632
638
let send_request = || {
633
639
self . stacks_node_client
634
640
. post ( & path)
@@ -678,7 +684,7 @@ impl StacksClient {
678
684
"{}/v2/contracts/call-read/:principal/{contract_name}/{function_name}" ,
679
685
self . http_origin
680
686
) ;
681
- let timer = crate :: monitoring:: new_rpc_call_timer ( & timer_label, & self . http_origin ) ;
687
+ let timer = crate :: monitoring:: actions :: new_rpc_call_timer ( & timer_label, & self . http_origin ) ;
682
688
let response = self
683
689
. stacks_node_client
684
690
. post ( path)
0 commit comments