fix: Clarify allowed format for metric label overrides

Clarify on the allowed format flag "--allow-metric-labels"
This commit is contained in:
yongruilin 2024-10-09 15:55:53 -07:00
parent 78d6490412
commit 75386c82c8

View File

@ -129,7 +129,7 @@ func validateAllowMetricLabel(allowListMapping map[string]string) error {
for k := range allowListMapping {
reg := regexp.MustCompile(metricNameRegex + `,` + labelRegex)
if reg.FindString(k) != k {
return fmt.Errorf("--allow-metric-labels must have a list of kv pair with format `metricName:labelName=labelValue, labelValue,...`")
return fmt.Errorf("--allow-metric-labels must have a list of kv pair with format `metricName,labelName=labelValue, labelValue,...`")
}
}
return nil