File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,30 @@ impl Executor<SubmitTxToMempool> for DutchExecutor {
6868 send_metric ! ( metric_future) ;
6969 }
7070
71+ // send keystore metrics
72+ let keys_in_use = self . key_store . get_keys_in_use ( ) ;
73+ let keys_available = self . key_store . get_keys_available ( ) ;
74+
75+ let keys_in_use_future = build_metric_future (
76+ self . cloudwatch_client . clone ( ) ,
77+ DimensionValue :: V3Executor ,
78+ CwMetrics :: KeysInUse ( chain_id) ,
79+ keys_in_use as f64 ,
80+ ) ;
81+ if let Some ( metric_future) = keys_in_use_future {
82+ send_metric ! ( metric_future) ;
83+ }
84+
85+ let keys_available_future = build_metric_future (
86+ self . cloudwatch_client . clone ( ) ,
87+ DimensionValue :: V3Executor ,
88+ CwMetrics :: KeysAvailable ( chain_id) ,
89+ keys_available as f64 ,
90+ ) ;
91+ if let Some ( metric_future) = keys_available_future {
92+ send_metric ! ( metric_future) ;
93+ }
94+
7195 // Acquire a key from the key store
7296 let ( addr, private_key) = self
7397 . key_store
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ impl Executor<SubmitTxToMempoolWithExecutionMetadata> for PriorityExecutor {
294294 if let Some ( metric_future) = metric_future {
295295 send_metric_with_order_hash ! ( & order_hash, metric_future) ;
296296 }
297- // send keystore metrics in the background
297+ // send keystore metrics
298298 let keys_in_use = self . key_store . get_keys_in_use ( ) ;
299299 let keys_available = self . key_store . get_keys_available ( ) ;
300300
You can’t perform that action at this time.
0 commit comments