diff --git a/translator/translate/otel/exporter/awscloudwatch/translator.go b/translator/translate/otel/exporter/awscloudwatch/translator.go index 736b2aeffd..a3f8094db1 100644 --- a/translator/translate/otel/exporter/awscloudwatch/translator.go +++ b/translator/translate/otel/exporter/awscloudwatch/translator.go @@ -173,10 +173,10 @@ func getDropOriginalMetrics(conf *confmap.Conf) map[string]bool { for _, dropMetric := range dropMetrics { if _, in := toDropMap[category]; in { dropMetric, ok := dropMetric.(string) - if ok { - dropOriginalMetrics[dropMetric] = true + if !ok { + continue } - continue + dropOriginalMetrics[dropMetric] = true } measurements := common.GetArray[any](conf, measurementCfgKey)