mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-11 03:31:26 +00:00
Fix missing dsn sanitization for logging (#1104)
This log line was not sanitized previously which could result in logging sensitive information. I have scanned the rest of the files and I don't see anywhere else that DSN is used in a log line without this filter. Resolves #1042 Signed-off-by: Joe Adams <github@joeadams.io>
This commit is contained in:
parent
99e1b5118c
commit
4c170ed564
@ -681,7 +681,7 @@ func (e *Exporter) scrape(ch chan<- prometheus.Metric) {
|
||||
if err := e.scrapeDSN(ch, dsn); err != nil {
|
||||
errorsCount++
|
||||
|
||||
logger.Error("error scraping dsn", "err", err, "dsn", dsn)
|
||||
logger.Error("error scraping dsn", "err", err, "dsn", loggableDSN(dsn))
|
||||
|
||||
if _, ok := err.(*ErrorConnectToServer); ok {
|
||||
connectionErrorsCount++
|
||||
|
Loading…
Reference in New Issue
Block a user