mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
lib/promscrape: properly log the actual response size after c4229a1bba
This commit is contained in:
parent
ba5a6c851c
commit
2c4e384f07
1 changed files with 1 additions and 1 deletions
|
@ -324,7 +324,7 @@ func (c *client) ReadData(dst []byte) ([]byte, error) {
|
||||||
if len(dst) > c.hc.MaxResponseBodySize {
|
if len(dst) > c.hc.MaxResponseBodySize {
|
||||||
maxScrapeSizeExceeded.Inc()
|
maxScrapeSizeExceeded.Inc()
|
||||||
return dst, fmt.Errorf("the response from %q exceeds -promscrape.maxScrapeSize=%d (the actual response size is %d bytes); "+
|
return dst, fmt.Errorf("the response from %q exceeds -promscrape.maxScrapeSize=%d (the actual response size is %d bytes); "+
|
||||||
"either reduce the response size for the target or increase -promscrape.maxScrapeSize", c.scrapeURL, len(dst), maxScrapeSize.N)
|
"either reduce the response size for the target or increase -promscrape.maxScrapeSize", c.scrapeURL, maxScrapeSize.N, len(dst))
|
||||||
}
|
}
|
||||||
if statusCode != fasthttp.StatusOK {
|
if statusCode != fasthttp.StatusOK {
|
||||||
metrics.GetOrCreateCounter(fmt.Sprintf(`vm_promscrape_scrapes_total{status_code="%d"}`, statusCode)).Inc()
|
metrics.GetOrCreateCounter(fmt.Sprintf(`vm_promscrape_scrapes_total{status_code="%d"}`, statusCode)).Inc()
|
||||||
|
|
Loading…
Reference in a new issue