Skip to content

Commit

Permalink
[etcd] Log watch error source details (#2974)
Browse files Browse the repository at this point in the history
  • Loading branch information
vdarulis authored Dec 3, 2020
1 parent c595495 commit 30cfd98
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cluster/etcd/watchmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,13 @@ func (w *manager) Watch(key string) {

// handle the update
if err = r.Err(); err != nil {
logger.Error("received error on watch channel", zap.Error(err))
logger.Error(
"received error on watch channel",
zap.Uint64("etcd_cluster_id", r.Header.ClusterId),
zap.Uint64("etcd_member_id", r.Header.MemberId),
zap.Bool("etcd_watch_is_canceled", r.Canceled),
zap.Error(err),
)
w.m.etcdWatchError.Inc(1)
// do not stop here, even though the update contains an error
// we still take this chance to attempt a Get() for the latest value
Expand Down

0 comments on commit 30cfd98

Please sign in to comment.