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:
parent
03578d5df8
commit
3277aeefaa
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue