INNER CODE UNIT · Go
func
prometheus-msteams/prometheus-msteams · pkg/card/converterWorkflow.go:45
func (l loggingMiddleware) ConvertWorkflow(ctx context.Context, a webhook.Message) (c WorkflowConnectorCard, err error) {
defer func(begin time.Time) {
for _, attachment := range c.Attachments {
if len(attachment.Content.Actions) > 5 {
l.logger.Log(
"warning", "There can only be a maximum of 5 actions in a action collection",
"actions", attachment.Content.Actions,
)
}
}
_ = l.logger.Log(
"alert", a,
"card", c,
"took", time.Since(begin),
)
}(time.Now())
return l.next.ConvertWorkflow(ctx, a)