From 6e4d4ea402b84190f82618bec30275b7f7fb9229 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Tue, 24 Oct 2017 15:20:05 +0100 Subject: [PATCH] Initialise some counters in remote storage API. --- storage/remote/queue_manager.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/storage/remote/queue_manager.go b/storage/remote/queue_manager.go index e47e421fb..5e30fd0f6 100644 --- a/storage/remote/queue_manager.go +++ b/storage/remote/queue_manager.go @@ -183,6 +183,12 @@ func NewQueueManager(logger log.Logger, cfg config.QueueConfig, externalLabels m numShards.WithLabelValues(t.queueName).Set(float64(t.numShards)) queueCapacity.WithLabelValues(t.queueName).Set(float64(t.cfg.Capacity)) + // Initialise counter labels to zero. + sentBatchDuration.WithLabelValues(t.queueName) + succeededSamplesTotal.WithLabelValues(t.queueName) + failedSamplesTotal.WithLabelValues(t.queueName) + droppedSamplesTotal.WithLabelValues(t.queueName) + return t }