Improve zebra-state logging and metrics
This commit is contained in:
parent
753b93d8a3
commit
d3b6a73f7b
|
@ -3212,6 +3212,7 @@ dependencies = [
|
|||
"futures",
|
||||
"hex",
|
||||
"lazy_static",
|
||||
"metrics",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"sled",
|
||||
|
|
|
@ -18,6 +18,7 @@ serde = { version = "1", features = ["serde_derive"] }
|
|||
sled = "0.34.3"
|
||||
|
||||
futures = "0.3.5"
|
||||
metrics = "0.12"
|
||||
tower = "0.3.1"
|
||||
tracing = "0.1"
|
||||
tracing-error = "0.1.2"
|
||||
|
|
|
@ -57,6 +57,10 @@ impl SledState {
|
|||
Ok(())
|
||||
})?;
|
||||
|
||||
tracing::trace!(?height, ?hash, "Committed block");
|
||||
metrics::gauge!("state.committed.block.height", height.0 as _);
|
||||
metrics::counter!("state.committed.block.count", 1);
|
||||
|
||||
Ok(hash)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue