diff --git a/internal/component/prometheus/exporter/cloudwatch/config.go b/internal/component/prometheus/exporter/cloudwatch/config.go index c1032e91d6..a4259218d1 100644 --- a/internal/component/prometheus/exporter/cloudwatch/config.go +++ b/internal/component/prometheus/exporter/cloudwatch/config.go @@ -318,15 +318,6 @@ func toYACEDiscoveryJob(rj DiscoveryJob) *yaceConf.Job { // By setting RoundingPeriod to nil, the exporter will align the start and end times for retrieving CloudWatch // metrics, with the smallest period in the retrieved batch. RoundingPeriod: nil, - JobLevelMetricFields: yaceConf.JobLevelMetricFields{ - // Set to zero job-wide scraping time settings. This should be configured at the metric level to make the data - // being fetched more explicit. - Period: 0, - Length: 0, - Delay: 0, - NilToZero: nilToZero, - AddCloudwatchTimestamp: &addCloudwatchTimestamp, - }, Metrics: toYACEMetrics(rj.Metrics, nilToZero), } return job @@ -348,15 +339,6 @@ func toYACECustomNamespaceJob(cn CustomNamespaceJob) *yaceConf.CustomNamespace { // metrics, with the smallest period in the retrieved batch. RoundingPeriod: nil, RecentlyActiveOnly: cn.RecentlyActiveOnly, - JobLevelMetricFields: yaceConf.JobLevelMetricFields{ - // Set to zero job-wide scraping time settings. This should be configured at the metric level to make the data - // being fetched more explicit. - Period: 0, - Length: 0, - Delay: 0, - NilToZero: nilToZero, - AddCloudwatchTimestamp: &addCloudwatchTimestamp, - }, Metrics: toYACEMetrics(cn.Metrics, nilToZero), } } diff --git a/internal/component/prometheus/exporter/cloudwatch/config_test.go b/internal/component/prometheus/exporter/cloudwatch/config_test.go index c807b40dce..ed381d8775 100644 --- a/internal/component/prometheus/exporter/cloudwatch/config_test.go +++ b/internal/component/prometheus/exporter/cloudwatch/config_test.go @@ -308,13 +308,6 @@ func TestCloudwatchComponentConfig(t *testing.T) { }, }, RoundingPeriod: nil, - JobLevelMetricFields: yaceModel.JobLevelMetricFields{ - Period: 0, - Length: 0, - Delay: 0, - AddCloudwatchTimestamp: &falsePtr, - NilToZero: &defaultNilToZero, - }, ExportedTagsOnMetrics: []string{"name"}, DimensionsRegexps: []yaceModel.DimensionsRegexp{ { @@ -343,13 +336,6 @@ func TestCloudwatchComponentConfig(t *testing.T) { }, }, RoundingPeriod: nil, - JobLevelMetricFields: yaceModel.JobLevelMetricFields{ - Period: 0, - Length: 0, - Delay: 0, - AddCloudwatchTimestamp: &falsePtr, - NilToZero: &defaultNilToZero, - }, ExportedTagsOnMetrics: []string{}, DimensionsRegexps: []yaceModel.DimensionsRegexp{ { @@ -383,13 +369,6 @@ func TestCloudwatchComponentConfig(t *testing.T) { }, }, RoundingPeriod: nil, - JobLevelMetricFields: yaceModel.JobLevelMetricFields{ - Period: 0, - Length: 0, - Delay: 0, - AddCloudwatchTimestamp: &falsePtr, - NilToZero: &defaultNilToZero, - }, ExportedTagsOnMetrics: []string{}, DimensionsRegexps: []yaceModel.DimensionsRegexp{ { @@ -435,13 +414,6 @@ func TestCloudwatchComponentConfig(t *testing.T) { }, }, RoundingPeriod: nil, - JobLevelMetricFields: yaceModel.JobLevelMetricFields{ - Period: 0, - Length: 0, - Delay: 0, - AddCloudwatchTimestamp: &falsePtr, - NilToZero: &defaultNilToZero, - }, }, }, }, @@ -546,13 +518,6 @@ func TestCloudwatchComponentConfig(t *testing.T) { }, }, RoundingPeriod: nil, - JobLevelMetricFields: yaceModel.JobLevelMetricFields{ - Period: 0, - Length: 0, - Delay: 0, - AddCloudwatchTimestamp: &falsePtr, - NilToZero: &falsePtr, - }, ExportedTagsOnMetrics: []string{"name"}, DimensionsRegexps: []yaceModel.DimensionsRegexp{ { @@ -598,13 +563,6 @@ func TestCloudwatchComponentConfig(t *testing.T) { }, }, RoundingPeriod: nil, - JobLevelMetricFields: yaceModel.JobLevelMetricFields{ - Period: 0, - Length: 0, - Delay: 0, - AddCloudwatchTimestamp: &falsePtr, - NilToZero: &falsePtr, - }, }, }, }, diff --git a/internal/static/integrations/cloudwatch_exporter/config.go b/internal/static/integrations/cloudwatch_exporter/config.go index 7756bc72b2..9dcd2fd154 100644 --- a/internal/static/integrations/cloudwatch_exporter/config.go +++ b/internal/static/integrations/cloudwatch_exporter/config.go @@ -297,16 +297,6 @@ func toYACEDiscoveryJob(job *DiscoveryJob) *yaceConf.Job { // By setting RoundingPeriod to nil, the exporter will align the start and end times for retrieving CloudWatch // metrics, with the smallest period in the retrieved batch. RoundingPeriod: nil, - - JobLevelMetricFields: yaceConf.JobLevelMetricFields{ - // Set to zero job-wide scraping time settings. This should be configured at the metric level to make the data - // being fetched more explicit. - Period: 0, - Length: 0, - Delay: 0, - NilToZero: nilToZero, - AddCloudwatchTimestamp: &addCloudwatchTimestamp, - }, } return &yaceJob }