From 3df3d9ac835b28c6519a087221a0cc51c28c97e1 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Sat, 10 Dec 2016 21:42:30 +0900 Subject: [PATCH] prometheus: move promDistBlockPeerFailures to readFromPeer --- distributor/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distributor/storage.go b/distributor/storage.go index a7a8335..7fa7cd7 100644 --- a/distributor/storage.go +++ b/distributor/storage.go @@ -100,7 +100,6 @@ func (d *Distributor) readSequential(ctx context.Context, i torus.BlockRef, peer // If this peer didn't have it, continue if err == torus.ErrBlockUnavailable || err == torus.ErrNoPeer { clog.Warningf("block %s from %s failed, trying next peer", i, p) - promDistBlockPeerFailures.WithLabelValues(p).Inc() continue } @@ -159,6 +158,7 @@ func (d *Distributor) readFromPeer(ctx context.Context, i torus.BlockRef, peer s promDistBlockPeerHits.WithLabelValues(peer).Inc() return blk, nil } + promDistBlockPeerFailures.WithLabelValues(peer).Inc() return nil, err }