Skip to content

Commit

Permalink
etcdserver: add "etcd_server_read_indexes_pending_total"
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed Jul 2, 2018
1 parent 4733a1d commit b64d1eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions etcdserver/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ var (
Name: "proposals_failed_total",
Help: "The total number of failed proposals seen.",
})
readIndexPending = prometheus.NewCounter(prometheus.CounterOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "read_indexes_pending_total",
Help: "The total number of pending read indexes not in sync with leader's.",
})
leaseExpired = prometheus.NewCounter(prometheus.CounterOpts{
Namespace: "etcd_debugging",
Subsystem: "server",
Expand Down Expand Up @@ -109,6 +115,7 @@ func init() {
prometheus.MustRegister(proposalsApplied)
prometheus.MustRegister(proposalsPending)
prometheus.MustRegister(proposalsFailed)
prometheus.MustRegister(readIndexPending)
prometheus.MustRegister(leaseExpired)
prometheus.MustRegister(quotaBackendBytes)
prometheus.MustRegister(currentVersion)
Expand Down
1 change: 1 addition & 0 deletions etcdserver/v3_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ func (s *EtcdServer) linearizableReadLoop() {
} else {
plog.Warningf("ignored out-of-date read index response; local node read indexes queueing up and waiting to be in sync with leader (request ID want %d, got %d)", id1, id2)
}
readIndexPending.Inc()
}
case <-time.After(s.Cfg.ReqTimeout()):
if lg != nil {
Expand Down

0 comments on commit b64d1eb

Please sign in to comment.