Merge pull request #12002 from hanjm/fix/jimmiehan-fix-scrape_pool_target_limit-metric

scrape: fix prometheus_target_scrape_pool_target_limit metric not set on creating scrape pool
This commit is contained in:
Julien Pivotto 2023-03-06 14:41:20 +01:00 committed by GitHub
commit f35ac7929d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -328,7 +328,7 @@ func newScrapePool(cfg *config.ScrapeConfig, app storage.Appendable, jitterSeed
options.PassMetadataInContext,
)
}
targetScrapePoolTargetLimit.WithLabelValues(sp.config.JobName).Set(float64(sp.config.TargetLimit))
return sp, nil
}