Use labels fp for sorting alerts

Labels fp is stable, contant fp will keep changing
This commit is contained in:
Łukasz Mierzwa
2017-07-01 08:33:34 -07:00
parent c6362ded78
commit 68b8e5fecf

View File

@@ -26,7 +26,7 @@ func (a AlertList) Less(i, j int) bool {
if a[i].StartsAt.Before(a[j].StartsAt) {
return false
}
return a[i].ContentFingerprint() < a[j].ContentFingerprint()
return a[i].LabelsFingerprint() < a[j].LabelsFingerprint()
}
// AlertGroup is vanilla Alertmanager group, but alerts are flattened