mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 06:17:27 -08:00
scrape: retain all dropped targets when KeepDroppedTargets is zero
This was a bug. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
627c99424b
commit
611f50bb3d
|
@ -529,7 +529,7 @@ func (sp *scrapePool) Sync(tgs []*targetgroup.Group) {
|
|||
case nonEmpty:
|
||||
all = append(all, t)
|
||||
case !t.discoveredLabels.IsEmpty():
|
||||
if sp.config.KeepDroppedTargets != 0 && uint(len(sp.droppedTargets)) < sp.config.KeepDroppedTargets {
|
||||
if sp.config.KeepDroppedTargets == 0 || uint(len(sp.droppedTargets)) < sp.config.KeepDroppedTargets {
|
||||
sp.droppedTargets = append(sp.droppedTargets, t)
|
||||
}
|
||||
sp.droppedTargetsCount++
|
||||
|
|
Loading…
Reference in a new issue