Description
The bridge_last_observed_actions_seq_num metric is currently not updated when
the bridge watchers observe a BridgeAction.
In crates/sui-bridge/src/orchestrator.rs, both the Sui gRPC watcher and the
Ethereum watcher call with_label_values(...):
metrics
.last_observed_actions_seq_num
.with_label_values(&[
action.chain_id().to_string().as_str(),
action.action_type().to_string().as_str(),
]);
However, the returned gauge is never updated with action.seq_number().
The metric is an IntGaugeVec whose description is:
The latest observed action sequence number per chain_id and action_type
with_label_values() only gets or creates the labeled gauge. It does not change its value, so newly created series remain at the default value of zero.
Impact
This can make monitoring dashboards incorrectly suggest that:
- no action has been observed for a chain/action type;
- the corresponding action sequence has not progressed; or
- the bridge watcher or syncer is stalled.
Expected behavior
Whenever either watcher observes a BridgeAction, the corresponding gauge should be set to action.seq_number().
Proposed fix
Update both watcher paths to call:
metrics
.last_observed_actions_seq_num
.with_label_values(&[&chain_id, &action_type])
.set(action.seq_number() as i64);
Description
The
bridge_last_observed_actions_seq_nummetric is currently not updated whenthe bridge watchers observe a
BridgeAction.In
crates/sui-bridge/src/orchestrator.rs, both the Sui gRPC watcher and theEthereum watcher call
with_label_values(...):metrics .last_observed_actions_seq_num .with_label_values(&[ action.chain_id().to_string().as_str(), action.action_type().to_string().as_str(), ]);However, the returned gauge is never updated with
action.seq_number().The metric is an
IntGaugeVecwhose description is:with_label_values()only gets or creates the labeled gauge. It does not change its value, so newly created series remain at the default value of zero.Impact
This can make monitoring dashboards incorrectly suggest that:
Expected behavior
Whenever either watcher observes a
BridgeAction, the corresponding gauge should be set toaction.seq_number().Proposed fix
Update both watcher paths to call:
metrics .last_observed_actions_seq_num .with_label_values(&[&chain_id, &action_type]) .set(action.seq_number() as i64);