mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 21:24:05 -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
|
||||
}
|
||||
|
||||
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(
|
||||
newQueueManagerMetrics(rws.reg, name, endpoint),
|
||||
rws.watcherMetrics,
|
||||
|
|
Loading…
Reference in a new issue