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