From 7de3c0a09a1ccd29c2422d80bb9fd1c7ebd34e63 Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Wed, 21 Nov 2018 02:52:33 +0100 Subject: [PATCH] Removed the references to a pruning 'side' in the singlepruner logging code and the snapjob prometheus thing. --- daemon/job/snapjob.go | 4 ++-- daemon/pruner/pruner.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/job/snapjob.go b/daemon/job/snapjob.go index dc6c9bc..45722e9 100644 --- a/daemon/job/snapjob.go +++ b/daemon/job/snapjob.go @@ -21,7 +21,7 @@ type SnapJob struct { prunerFactory *pruner.SinglePrunerFactory - promPruneSecs *prometheus.HistogramVec // labels: prune_side + promPruneSecs *prometheus.HistogramVec // no labels! pruner *pruner.Pruner } @@ -63,7 +63,7 @@ func snapJob(g *config.Global, in *config.SnapJob) (j *SnapJob, err error) { Name: "time", Help: "seconds spent in pruner", ConstLabels: prometheus.Labels{"zrepl_job":j.name}, - }, []string{"prune_side"}) + }, []string {}) j.prunerFactory, err = pruner.NewSinglePrunerFactory(in.Pruning, j.promPruneSecs) if err != nil { return nil, errors.Wrap(err, "cannot build snapjob pruning rules") diff --git a/daemon/pruner/pruner.go b/daemon/pruner/pruner.go index b1f391f..412c434 100644 --- a/daemon/pruner/pruner.go +++ b/daemon/pruner/pruner.go @@ -181,13 +181,13 @@ func (f *PrunerFactory) BuildReceiverPruner(ctx context.Context, target Target, func (f *SinglePrunerFactory) BuildSinglePruner(ctx context.Context, target Target, receiver History) *Pruner { p := &Pruner{ args: args{ - WithLogger(ctx, GetLogger(ctx).WithField("prune_side", "sender")), + ctx, target, receiver, f.keepRules, f.retryWait, f.considerSnapAtCursorReplicated, - f.promPruneSecs.WithLabelValues("sender"), + f.promPruneSecs.WithLabelValues(), }, state: Plan, }