diff --git a/components/playground/playground.go b/components/playground/playground.go index 17fc048fef..4b58e41773 100644 --- a/components/playground/playground.go +++ b/components/playground/playground.go @@ -1318,11 +1318,11 @@ func (p *Playground) renderSDFile() error { _ = p.WalkInstances(func(cid string, inst instance.Instance) error { v := inst.MetricAddr() - t, ok := cid2targets[cid] + t, ok := cid2targets[inst.Component()] if ok { v.Targets = append(v.Targets, t.Targets...) } - cid2targets[cid] = v + cid2targets[inst.Component()] = v return nil })