class
Raft::Metrics
- Raft::Metrics
- Reference
- Object
Overview
Observable counters and state for a Raft node.
Access via Node#metrics. Counters are incremented internally as the
node operates. All fields are readable and can be scraped for monitoring.
Defined in:
raft/metrics.crInstance Method Summary
-
#batches_processed : UInt64
Number of times a client-request batch was processed by the leader.
-
#batches_processed=(batches_processed : UInt64)
Number of times a client-request batch was processed by the leader.
-
#commit_index : UInt64
Index of the highest committed log entry.
-
#commit_index=(commit_index : UInt64)
Index of the highest committed log entry.
-
#elections_started : UInt64
Number of elections this node has initiated.
-
#elections_started=(elections_started : UInt64)
Number of elections this node has initiated.
-
#elections_won : UInt64
Number of elections this node has won (became leader).
-
#elections_won=(elections_won : UInt64)
Number of elections this node has won (became leader).
-
#entries_applied : UInt64
Total number of log entries applied to the state machine.
-
#entries_applied=(entries_applied : UInt64)
Total number of log entries applied to the state machine.
-
#proposals_committed : UInt64
Number of client proposals that were committed and applied.
-
#proposals_committed=(proposals_committed : UInt64)
Number of client proposals that were committed and applied.
-
#role : String
Current role as a string:
"follower","candidate", or"leader". -
#role=(role : String)
Current role as a string:
"follower","candidate", or"leader". -
#snapshots_installed : UInt64
Number of snapshots installed from a leader.
-
#snapshots_installed=(snapshots_installed : UInt64)
Number of snapshots installed from a leader.
-
#term : UInt64
Current Raft term.
-
#term=(term : UInt64)
Current Raft term.
-
#to_h : Hash(String, UInt64 | String)
Returns all metrics as a flat hash.
Instance Method Detail
Number of times a client-request batch was processed by the leader.
Each batch may contain one or more proposals. For concurrent workloads,
this should be less than #proposals_committed when batching is active.
Number of times a client-request batch was processed by the leader.
Each batch may contain one or more proposals. For concurrent workloads,
this should be less than #proposals_committed when batching is active.
Total number of log entries applied to the state machine.
Number of client proposals that were committed and applied.
Number of snapshots installed from a leader.