Add loopback health and Prometheus metrics endpoint
All checks were successful
CI / check (push) Successful in 4m22s
All checks were successful
CI / check (push) Successful in 4m22s
This commit is contained in:
parent
381f706634
commit
ad8a3fe065
6 changed files with 180 additions and 0 deletions
|
|
@ -935,6 +935,12 @@ impl EventLog {
|
|||
self.entries.len()
|
||||
}
|
||||
|
||||
// The highest Lamport clock seen. Monotonic across compaction (unlike `len`,
|
||||
// which a snapshot shrinks), so it's the gauge that shows the log advancing.
|
||||
fn lamport(&self) -> u64 {
|
||||
self.lamport
|
||||
}
|
||||
|
||||
// Rewrite the log to a minimal snapshot: one event per live account and
|
||||
// channel, authored under our origin at fresh sequence numbers. Peers
|
||||
// re-converge because the register events overwrite and cert replay is
|
||||
|
|
@ -1366,6 +1372,12 @@ impl Db {
|
|||
self.log.len()
|
||||
}
|
||||
|
||||
/// The highest Lamport clock committed — a monotonic gauge of log progress
|
||||
/// (survives compaction), for the health/metrics endpoint.
|
||||
pub fn lamport(&self) -> u64 {
|
||||
self.log.lamport()
|
||||
}
|
||||
|
||||
/// The events appended since `mark` (a value from an earlier [`log_len`]).
|
||||
pub fn events_since(&self, mark: usize) -> Vec<Event> {
|
||||
self.log.events_from(mark)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue