Skip to content

Commit

Permalink
Merge pull request #12677 from chaochn47/reduce_verbosity_of_etcd_ser…
Browse files Browse the repository at this point in the history
…ver_side_success_health_check_logs

etcdserver/api/etcdhttp: log successful etcd server side health check in debug level
  • Loading branch information
gyuho authored Feb 9, 2021
2 parents 96a9860 + 028d351 commit 44c889a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-3.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Fix [quorum protection logic when promoting a learner](https://github.com/etcd-io/etcd/pull/11640).
- Improve [peer corruption checker](https://github.com/etcd-io/etcd/pull/11621) to work when peer mTLS is enabled.
- Log [`[CLIENT-PORT]/health` check in server side](https://github.com/etcd-io/etcd/pull/11704).
- Log [successful etcd server-side health check in debug level](https://github.com/etcd-io/etcd/pull/12677).
- Improve [compaction performance when latest index is greater than 1-million](https://github.com/etcd-io/etcd/pull/11734).
- [Refactor consistentindex](https://github.com/etcd-io/etcd/pull/11699).
- [Add log when etcdserver failed to apply command](https://github.com/etcd-io/etcd/pull/11670).
Expand Down
6 changes: 3 additions & 3 deletions server/etcdserver/api/etcdhttp/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func NewHealthHandler(lg *zap.Logger, hfunc func() Health) http.HandlerFunc {
}
w.WriteHeader(http.StatusOK)
w.Write(d)
lg.Info("/health OK", zap.Int("status-code", http.StatusOK))
lg.Debug("/health OK", zap.Int("status-code", http.StatusOK))
}
}

Expand Down Expand Up @@ -154,7 +154,7 @@ func checkV2Health(lg *zap.Logger, srv etcdserver.ServerV2) (h Health) {
lg.Warn("serving /health false; QGET fails", zap.Error(err))
return
}
lg.Info("serving /health true")
lg.Debug("serving /health true")
return
}

Expand All @@ -171,6 +171,6 @@ func checkV3Health(lg *zap.Logger, srv *etcdserver.EtcdServer) (h Health) {
lg.Warn("serving /health false; Range fails", zap.Error(err))
return
}
lg.Info("serving /health true")
lg.Debug("serving /health true")
return
}

0 comments on commit 44c889a

Please sign in to comment.