Co-authored-by: wangfeng <wangfeng@zhihu.com>
This commit is contained in:
guidao 2021-11-30 07:12:24 +08:00 committed by Aliaksandr Valialkin
parent cc773ac199
commit 6fa7ad69fc
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

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; "+