Skip to content

Commit

Permalink
Properly break out of suffix loop if found match
Browse files Browse the repository at this point in the history
Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
  • Loading branch information
douglascamata committed Jan 28, 2022
1 parent b4a346f commit 7350a57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ func (a *Agent) MetricsRelayHandler(logCtx context.Context, in *envoyMetrics.Str
for _, suffix := range allowedMetricsSuffixes {
if strings.HasSuffix(metricFamily.GetName(), suffix) {
outMetrics = append(outMetrics, metricFamily)
continue
break
}
}
}
Expand Down

0 comments on commit 7350a57

Please sign in to comment.