Skip to content

Commit

Permalink
[State Sync v2] Update alerts and metrics. (aptos-labs#676)
Browse files Browse the repository at this point in the history
* [Alerts] Remove SSv1 alerts.

* [Metrics] Keep consistency with existing metric names.

* [Dashboards] Update SSv2 dashboard.

Co-authored-by: Josh Lind <[email protected]>
  • Loading branch information
JoshLind and JoshLind authored Apr 27, 2022
1 parent 95290bd commit 5de662d
Show file tree
Hide file tree
Showing 9 changed files with 1,523 additions and 1,548 deletions.
2 changes: 1 addition & 1 deletion state-sync/state-sync-v2/state-sync-driver/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl<

let operations = [
metrics::StorageSynchronizerOperations::ExecutedTransactions,
metrics::StorageSynchronizerOperations::SyncedTransactions,
metrics::StorageSynchronizerOperations::Synced,
];
for operation in operations {
metrics::increment_gauge(
Expand Down
4 changes: 2 additions & 2 deletions state-sync/state-sync-v2/state-sync-driver/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ pub const STORAGE_SYNCHRONIZER_PENDING_DATA: &str = "storage_synchronizer_pendin
pub enum StorageSynchronizerOperations {
AppliedTransactionOutputs, // Applied a chunk of transactions outputs.
ExecutedTransactions, // Executed a chunk of transactions.
Synced, // Wrote a chunk of transactions and outputs to storage.
SyncedAccounts, // Wrote a chunk of accounts to storage.
SyncedTransactions, // Wrote a chunk of transactions and outputs to storage.
}

impl StorageSynchronizerOperations {
Expand All @@ -25,8 +25,8 @@ impl StorageSynchronizerOperations {
"applied_transaction_outputs"
}
StorageSynchronizerOperations::ExecutedTransactions => "executed_transactions",
StorageSynchronizerOperations::Synced => "synced",
StorageSynchronizerOperations::SyncedAccounts => "synced_accounts",
StorageSynchronizerOperations::SyncedTransactions => "synced_transactions",
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ fn spawn_committer<
);
metrics::increment_gauge(
&metrics::STORAGE_SYNCHRONIZER_OPERATIONS,
metrics::StorageSynchronizerOperations::SyncedTransactions
metrics::StorageSynchronizerOperations::Synced
.get_label(),
transactions.len() as u64,
);
Expand Down
2 changes: 1 addition & 1 deletion state-sync/state-sync-v2/state-sync-driver/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ pub fn initialize_sync_version_gauges(storage: Arc<dyn DbReader>) -> Result<(),
let metrics = [
metrics::StorageSynchronizerOperations::AppliedTransactionOutputs,
metrics::StorageSynchronizerOperations::ExecutedTransactions,
metrics::StorageSynchronizerOperations::SyncedTransactions,
metrics::StorageSynchronizerOperations::Synced,
];

for metric in metrics {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ groups:
severity: error
summary: "State sync is not making progress (i.e., it is not keeping up with the head of the blockchain)"
annotations:
- alert: State sync has no active upstream peers
expr: (sum by (owner, kubernetes_pod_name) (aptos_state_sync_active_upstream_peers)) == 0
for: 3m
labels:
severity: error
summary: "State sync has no active upstream peers (i.e., it has no peers to synchronize from!)"
# lower severity alert for monitoring
- alert: Monitoring pod crashing
expr: count(time() - container_start_time_seconds{container!="", container!="POD", pod=~".*monitoring.*"} < 60)
Expand Down
Loading

0 comments on commit 5de662d

Please sign in to comment.