From 7eb406be465eec47cce905e363c72e77d02f95d0 Mon Sep 17 00:00:00 2001 From: Lewis Robbins Date: Sun, 12 Feb 2023 18:09:38 +0000 Subject: [PATCH] more on validate --- receiver/awscloudwatchmetricsreceiver/config.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() }