diff --git a/pkg/prometheus-adapter/expression.go b/pkg/prometheus-adapter/expression.go index 6ceac7b71..c3ae983af 100644 --- a/pkg/prometheus-adapter/expression.go +++ b/pkg/prometheus-adapter/expression.go @@ -218,7 +218,7 @@ func GetMetricRulesFromDiscoveryRule(cfg []config.DiscoveryRule, mapper meta.RES // get MetricRule for metricName func MatchMetricRule(mrs []MetricRule, metricName string) *MetricRule { for _, metricRule := range mrs { - if match, _ := (regexp.Match(metricRule.MetricMatches, []byte(metricName))); match { + if match, _ := regexp.Match(metricRule.MetricMatches, []byte(metricName)); match { return &metricRule } }