/lib/promscrape: use correct err logger for scrape unmarshalling (#3645)

/lib/promscrape: use correct err logger for scrape unmarshalling
It correctly suppresses scrape errors and adds correct context for err msg
This commit is contained in:
Nikolay 2023-01-12 17:40:42 +01:00 committed by Aliaksandr Valialkin
parent 46fe2885a1
commit 0a787fca3e
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
2 changed files with 2 additions and 1 deletions

View file

@ -15,6 +15,7 @@ The following tip changes can be tested by building VictoriaMetrics components f
## v1.79.x long-time support release (LTS)
* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): correctly log scrape errors when flag`-promscrape.suppressScrapeErrors` is enabled and provide correct error context for it. Previously, it logged the error without the context of which job failed.
* BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly parse `M` and `Mi` suffixes as `1e6` multipliers in `1M` and `1Mi` numeric constants. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3664). The issue has been introduced in [v1.79.7](https://docs.victoriametrics.com/CHANGELOG.html#v1797).
## [v1.79.7](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.79.7)

View file

@ -745,7 +745,7 @@ func (sw *scrapeWork) sendStaleSeries(lastScrape, currScrape string, timestamp i
}
wc := &writeRequestCtx{}
if bodyString != "" {
wc.rows.Unmarshal(bodyString)
wc.rows.UnmarshalWithErrLogger(bodyString, sw.logError)
srcRows := wc.rows.Rows
for i := range srcRows {
sw.addRowToTimeseries(wc, &srcRows[i], timestamp, true)