@@ -30,6 +30,7 @@ pub struct BatcherMetrics {
3030 pub message_handler_user_lock_timeouts : IntCounter ,
3131 pub message_handler_batch_lock_timeouts : IntCounter ,
3232 pub message_handler_user_states_lock_timeouts : IntCounter ,
33+ pub unlocked_event_polling_batch_lock_timeouts : IntCounter ,
3334 pub available_data_services : IntGauge ,
3435}
3536
@@ -103,6 +104,11 @@ impl BatcherMetrics {
103104 "Message Handler User States Lock Timeouts"
104105 ) ) ?;
105106
107+ let unlocked_event_polling_batch_lock_timeouts = register_int_counter ! ( opts!(
108+ "unlocked_event_polling_batch_lock_timeouts_count" ,
109+ "Unlocked Event Polling Batch Lock Timeouts"
110+ ) ) ?;
111+
106112 registry. register ( Box :: new ( open_connections. clone ( ) ) ) ?;
107113 registry. register ( Box :: new ( received_proofs. clone ( ) ) ) ?;
108114 registry. register ( Box :: new ( sent_batches. clone ( ) ) ) ?;
@@ -122,6 +128,7 @@ impl BatcherMetrics {
122128 registry. register ( Box :: new ( message_handler_user_lock_timeouts. clone ( ) ) ) ?;
123129 registry. register ( Box :: new ( message_handler_batch_lock_timeouts. clone ( ) ) ) ?;
124130 registry. register ( Box :: new ( message_handler_user_states_lock_timeouts. clone ( ) ) ) ?;
131+ registry. register ( Box :: new ( unlocked_event_polling_batch_lock_timeouts. clone ( ) ) ) ?;
125132 registry. register ( Box :: new ( available_data_services. clone ( ) ) ) ?;
126133
127134 let metrics_route = warp:: path!( "metrics" )
@@ -154,6 +161,7 @@ impl BatcherMetrics {
154161 message_handler_user_lock_timeouts,
155162 message_handler_batch_lock_timeouts,
156163 message_handler_user_states_lock_timeouts,
164+ unlocked_event_polling_batch_lock_timeouts,
157165 available_data_services,
158166 } )
159167 }
@@ -200,4 +208,8 @@ impl BatcherMetrics {
200208 pub fn inc_message_handler_user_states_lock_timeouts ( & self ) {
201209 self . message_handler_user_states_lock_timeouts . inc ( ) ;
202210 }
211+
212+ pub fn inc_unlocked_event_polling_batch_lock_timeout ( & self ) {
213+ self . unlocked_event_polling_batch_lock_timeouts . inc ( ) ;
214+ }
203215}
0 commit comments