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 <bjboreham@gmail.com>
This commit is contained in:
Bryan Boreham 2018-06-01 12:59:33 +00:00
parent 03578d5df8
commit 3277aeefaa
1 changed files with 2 additions and 0 deletions

View File

@ -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,