From 44371ec1bcf2e1e606f3504dc6ab75308c106569 Mon Sep 17 00:00:00 2001 From: Maurice Meyer Date: Mon, 16 Sep 2024 14:33:48 +0200 Subject: [PATCH] fixup! chore: bump yet-another-cloudwatch-exporter to v0.61.0 --- .../prometheus/exporter/cloudwatch/config.go | 18 -------- .../exporter/cloudwatch/config_test.go | 42 ------------------- .../cloudwatch_exporter/config.go | 10 ----- 3 files changed, 70 deletions(-) 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 }