Co-authored-by: wangfeng <wangfeng@zhihu.com>
This commit is contained in:
guidao 2021-11-30 07:12:24 +08:00 committed by GitHub
parent 841647643a
commit f05cddd2fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -324,8 +324,8 @@ func (sg *scraperGroup) update(sws []*ScrapeWork) {
var swsToStart []*ScrapeWork
for _, sw := range sws {
key := sw.key()
originalLabels := swsMap[key]
if originalLabels != nil {
originalLabels, ok := swsMap[key]
if ok {
if !*suppressDuplicateScrapeTargetErrors {
logger.Errorf("skipping duplicate scrape target with identical labels; endpoint=%s, labels=%s; "+
"make sure service discovery and relabeling is set up properly; "+