Merge pull request #4210 from bboreham/log-remote-name

Add queue name to logger for remote writes
This commit is contained in:
Fabian Reinartz 2018-06-04 15:49:39 +02:00 committed by GitHub
commit fe80dddbc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 { func NewQueueManager(logger log.Logger, cfg config.QueueConfig, externalLabels model.LabelSet, relabelConfigs []*config.RelabelConfig, client StorageClient, flushDeadline time.Duration) *QueueManager {
if logger == nil { if logger == nil {
logger = log.NewNopLogger() logger = log.NewNopLogger()
} else {
logger = log.With(logger, "queue", client.Name())
} }
t := &QueueManager{ t := &QueueManager{
logger: logger, logger: logger,