mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-04 06:02:13 -04:00
Fix scrape failure logs
Before this change, logs would show like:
```
{...,"target":"http://localhost:8080/metrics","!BADKEY":"Get ..."}
```
After this change
```
{...,"msg":"Get ...","job_name":...,"target":...}
```
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
bac1fa6149
commit
37f3f3f2db
1 changed files with 1 additions and 1 deletions
|
|
@ -1421,7 +1421,7 @@ func (sl *scrapeLoop) scrapeAndReport(last, appendTime time.Time, errc chan<- er
|
|||
sl.l.Debug("Scrape failed", "err", scrapeErr)
|
||||
sl.scrapeFailureLoggerMtx.RLock()
|
||||
if sl.scrapeFailureLogger != nil {
|
||||
sl.scrapeFailureLogger.Error("err", scrapeErr)
|
||||
sl.scrapeFailureLogger.Error(scrapeErr.Error())
|
||||
}
|
||||
sl.scrapeFailureLoggerMtx.RUnlock()
|
||||
if errc != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue