From 8e185b82eed47fea9d383ae2b7fad467d2e3a660 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Fri, 17 Jan 2025 17:38:02 -0800 Subject: [PATCH] [chore] ignore k8s.node.name when checking cluster metrics (#1622) --- functional_tests/functional_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functional_tests/functional_test.go b/functional_tests/functional_test.go index 248afbe42d..b920c815c7 100644 --- a/functional_tests/functional_test.go +++ b/functional_tests/functional_test.go @@ -834,6 +834,7 @@ func testK8sClusterReceiverMetrics(t *testing.T) { pmetrictest.IgnoreMetricAttributeValue("k8s.deployment.uid", metricNames...), pmetrictest.IgnoreMetricAttributeValue("k8s.pod.uid", metricNames...), pmetrictest.IgnoreMetricAttributeValue("k8s.pod.name", metricNames...), + pmetrictest.IgnoreMetricAttributeValue("k8s.node.name", metricNames...), pmetrictest.IgnoreMetricAttributeValue("k8s.replicaset.uid", metricNames...), pmetrictest.IgnoreMetricAttributeValue("k8s.replicaset.name", metricNames...), pmetrictest.IgnoreMetricAttributeValue("k8s.namespace.uid", metricNames...), @@ -860,7 +861,7 @@ func testK8sClusterReceiverMetrics(t *testing.T) { pmetrictest.IgnoreMetricsOrder(), pmetrictest.IgnoreScopeMetricsOrder(), pmetrictest.IgnoreMetricDataPointsOrder(), - pmetrictest.IgnoreSubsequentDataPoints("k8s.container.ready", "k8s.container.restarts"), + pmetrictest.IgnoreSubsequentDataPoints("k8s.container.ready", "k8s.container.restarts", "k8s.pod.phase"), ) if err != nil && os.Getenv("UPDATE_EXPECTED_RESULTS") == "true" { writeNewExpectedMetricsResult(t, expectedMetricsFile, selectedMetrics)