Remove field limitation from slack notification (#33113)

This commit is contained in:
Dimitris Sotirakis 2021-04-20 12:01:05 +03:00 committed by GitHub
parent 04781bfcc6
commit b3ce655b67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,16 +198,12 @@ func (sn *SlackNotifier) Notify(evalContext *alerting.EvalContext) error {
}
fields := make([]map[string]interface{}, 0)
fieldLimitCount := 4
for index, evt := range evalContext.EvalMatches {
for _, evt := range evalContext.EvalMatches {
fields = append(fields, map[string]interface{}{
"title": evt.Metric,
"value": evt.Value,
"short": true,
})
if index > fieldLimitCount {
break
}
}
if evalContext.Error != nil {