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>
pull/9387/head
Nick Pillitteri 3 years ago committed by GitHub
parent d77c985f8c
commit acee8c8a88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save