mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Redact remote write URL when used for metric label (#9383)
Redact any basic auth passwords in the remote write URL (which are technically allowed although not recommended) when used as metric labels. Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
This commit is contained in:
parent
d77c985f8c
commit
acee8c8a88
|
@ -158,7 +158,10 @@ func (rws *WriteStorage) ApplyConfig(conf *config.Config) error {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
endpoint := rwConf.URL.String()
|
// Redacted to remove any passwords in the URL (that are
|
||||||
|
// technically accepted but not recommended) since this is
|
||||||
|
// only used for metric labels.
|
||||||
|
endpoint := rwConf.URL.Redacted()
|
||||||
newQueues[hash] = NewQueueManager(
|
newQueues[hash] = NewQueueManager(
|
||||||
newQueueManagerMetrics(rws.reg, name, endpoint),
|
newQueueManagerMetrics(rws.reg, name, endpoint),
|
||||||
rws.watcherMetrics,
|
rws.watcherMetrics,
|
||||||
|
|
Loading…
Reference in a new issue