diff --git a/deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml b/deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml index 279af14e6..f72d8c0a0 100644 --- a/deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml +++ b/deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml @@ -16,7 +16,7 @@ filter/drop_unnecessary_metrics: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") {{- if .Values.sumologic.metrics.dropHistogramBuckets }} # drop histograms we've extracted sums and counts from, but don't want the full thing - - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") {{- end }} # Prometheus receiver puts all labels in record-level attributes, and we need them in resource diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml index 98069a47d..0dd0f9447 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml @@ -45,7 +45,7 @@ data: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY + or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") groupbyattrs: keys: - container diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml index 98e775b33..9723ea1b0 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml @@ -45,7 +45,7 @@ data: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY + or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") groupbyattrs: keys: - container diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml index 74b78e538..9ea3b748a 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml @@ -122,7 +122,7 @@ data: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY + or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") groupbyattrs: keys: - container diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug.output.yaml index 7778a16c2..84800fcfa 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug.output.yaml @@ -47,7 +47,7 @@ data: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY + or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") groupbyattrs: keys: - container diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock.output.yaml index c399b9a01..a90af0b7f 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock.output.yaml @@ -70,7 +70,7 @@ data: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY + or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") groupbyattrs: keys: - container diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock_http.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock_http.output.yaml index 130971593..7ed2166af 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock_http.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock_http.output.yaml @@ -147,7 +147,7 @@ data: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY + or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") groupbyattrs: keys: - container diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml index ad245b6ce..b35590bdd 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml @@ -69,7 +69,7 @@ data: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY + or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") groupbyattrs: keys: - container diff --git a/tests/integration/helm_prometheus_metrics_test.go b/tests/integration/helm_prometheus_metrics_test.go index 8408a0667..b9d2cb956 100644 --- a/tests/integration/helm_prometheus_metrics_test.go +++ b/tests/integration/helm_prometheus_metrics_test.go @@ -14,7 +14,7 @@ func Test_Helm_Prometheus_Metrics(t *testing.T) { // defaults without otel metrics collector metrics, but with Prometheus metrics expectedMetricsGroups := make([][]string, len(internal.DefaultExpectedMetricsGroups)) copy(expectedMetricsGroups, internal.DefaultExpectedMetricsGroups) - expectedMetricsGroups = append(expectedMetricsGroups, internal.PrometheusMetrics, internal.DefaultOtelcolMetrics, internal.BucketMetrics) + expectedMetricsGroups = append(expectedMetricsGroups, internal.PrometheusMetrics, internal.DefaultOtelcolMetrics) for _, metrics := range expectedMetricsGroups { expectedMetrics = append(expectedMetrics, metrics...) } diff --git a/tests/integration/internal/constants.go b/tests/integration/internal/constants.go index 5c19edb5f..91bbb0ec5 100644 --- a/tests/integration/internal/constants.go +++ b/tests/integration/internal/constants.go @@ -354,19 +354,6 @@ var ( "scrape_duration_seconds", } - // Bucket metrics are completely removed in OTC, but there may be still available in Prometheus - BucketMetrics = []string{ - "etcd_disk_wal_fsync_duration_seconds_bucket", - "scheduler_scheduling_attempt_duration_seconds_bucket", - "scheduler_scheduling_algorithm_duration_seconds_bucket", - "otelcol_processor_groupbyattrs_metric_groups_bucket", - "prometheus_remote_storage_sent_batch_duration_seconds_bucket", - "otelcol_processor_batch_batch_send_size_bucket", - "etcd_disk_backend_commit_duration_seconds_bucket", - "coredns_proxy_request_duration_seconds_bucket", - "scheduler_framework_extension_point_duration_seconds_bucket", - } - // Some metrics might change over k8s versions versionDependentMetrics = map[*version.Version](struct { before []string