Skip to content

Commit

Permalink
message label in custom mode
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Jogeleit <[email protected]>
  • Loading branch information
fjogeleit committed Nov 9, 2023
1 parent 50a1a8a commit d27e2e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/listener/metrics/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ var LabelGeneratorMapping = map[string]LabelCallback{
"status": func(m map[string]string, _ v1alpha2.ReportInterface, r v1alpha2.PolicyReportResult) {
m["status"] = string(r.Result)
},
"message": func(m map[string]string, _ v1alpha2.ReportInterface, r v1alpha2.PolicyReportResult) {
m["message"] = r.Message
},
}

func CreateLabelGenerator(labels []string, names []string) LabelGenerator {
Expand Down

0 comments on commit d27e2e4

Please sign in to comment.