Use fingerprint for target identity comparison

So far we were using the InstanceIdentifier to compare equality of targets.
This is not always accurate, for example for the blackbox exporter where the 
actual target is in the parameter.
pull/1402/head
Fabian Reinartz 9 years ago
parent c24c5e6fb3
commit 825831e98f

@ -265,7 +265,7 @@ func (tm *TargetManager) updateTargetGroup(tgroup *config.TargetGroup, cfg *conf
if told == nil { if told == nil {
continue continue
} }
if tnew.InstanceIdentifier() == told.InstanceIdentifier() { if tnew.fingerprint() == told.fingerprint() {
match = told match = told
oldTargets[j] = nil oldTargets[j] = nil
break break

Loading…
Cancel
Save