Changed name of metric

This commit is contained in:
Preetha Appan 2019-06-17 15:51:31 -05:00
parent c54b4a5b17
commit 104d66f10c
No known key found for this signature in database
GPG Key ID: 9F7C19990A50EAFC
1 changed files with 3 additions and 3 deletions

View File

@ -1454,13 +1454,13 @@ func (s *Server) Stats() map[string]map[string]string {
return stats
}
// EmitRaftStats is used to export metrics about the blocked eval tracker while enabled
// EmitRaftStats is used to export metrics about raft indexes and state store snapshot index
func (s *Server) EmitRaftStats(period time.Duration, stopCh <-chan struct{}) {
for {
select {
case <-time.After(period):
commitIndex := s.raft.LastIndex()
metrics.SetGauge([]string{"raft", "commitIndex"}, float32(commitIndex))
lastIndex := s.raft.LastIndex()
metrics.SetGauge([]string{"raft", "lastIndex"}, float32(lastIndex))
appliedIndex := s.raft.AppliedIndex()
metrics.SetGauge([]string{"raft", "appliedIndex"}, float32(appliedIndex))
stateStoreSnapshotIndex, err := s.State().LatestIndex()