From 3277aeefaa5d0f46ec73361f454ff7cddd864843 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 1 Jun 2018 12:59:33 +0000 Subject: [PATCH] Add queue name to logger for remote writes More than one remote_write destination can be configured, in which case it's essential to know which one each log message refers to. Signed-off-by: Bryan Boreham --- storage/remote/queue_manager.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/remote/queue_manager.go b/storage/remote/queue_manager.go index 7408c1f59..927601d7f 100644 --- a/storage/remote/queue_manager.go +++ b/storage/remote/queue_manager.go @@ -164,6 +164,8 @@ type QueueManager struct { func NewQueueManager(logger log.Logger, cfg config.QueueConfig, externalLabels model.LabelSet, relabelConfigs []*config.RelabelConfig, client StorageClient, flushDeadline time.Duration) *QueueManager { if logger == nil { logger = log.NewNopLogger() + } else { + logger = log.With(logger, "queue", client.Name()) } t := &QueueManager{ logger: logger,