diff --git a/receiver/awscloudwatchmetricsreceiver/config.go b/receiver/awscloudwatchmetricsreceiver/config.go index 3a3566adf340..06f6e0c9d381 100644 --- a/receiver/awscloudwatchmetricsreceiver/config.go +++ b/receiver/awscloudwatchmetricsreceiver/config.go @@ -71,5 +71,8 @@ func (cfg *Config) Validate() error { } func (cfg *Config) ValidateMetrics() error { - return nil + if cfg.Metrics == nil { + return errNoMetricsConfigured + } + return cfg.Metrics.Names.Validate() }