From 0f075c3ce535ec04ccf2330565b836f980f3ee75 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Tue, 23 Apr 2024 19:01:29 +0000 Subject: [PATCH] update untyped fixture --- .../testcases/testcases_metrics.go | 6 +----- .../testdata/fixtures/metrics/untyped_gauge.json | 16 +++++++++------- .../fixtures/metrics/untyped_gauge_expect.json | 6 +----- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/exporter/collector/integrationtest/testcases/testcases_metrics.go b/exporter/collector/integrationtest/testcases/testcases_metrics.go index 3c824f1a4..676ad6f07 100644 --- a/exporter/collector/integrationtest/testcases/testcases_metrics.go +++ b/exporter/collector/integrationtest/testcases/testcases_metrics.go @@ -350,11 +350,7 @@ var MetricsTestCases = []TestCase{ Name: "[GMP] Untyped Gauge becomes a GCM Gauge and a Cumulative with /unknown and /unknown:counter suffixes", OTLPInputFixturePath: "testdata/fixtures/metrics/untyped_gauge.json", ExpectFixturePath: "testdata/fixtures/metrics/untyped_gauge_gmp_expect.json", - ConfigureCollector: func(cfg *collector.Config) { - configureGMPCollector(cfg) - //nolint:errcheck - featuregate.GlobalRegistry().Set("gcp.untypedDoubleExport", true) - }, + ConfigureCollector: configureGMPCollector, // prometheus_target is not supported by the SDK SkipForSDK: true, }, diff --git a/exporter/collector/integrationtest/testdata/fixtures/metrics/untyped_gauge.json b/exporter/collector/integrationtest/testdata/fixtures/metrics/untyped_gauge.json index c03ca18ca..4945b5224 100644 --- a/exporter/collector/integrationtest/testdata/fixtures/metrics/untyped_gauge.json +++ b/exporter/collector/integrationtest/testdata/fixtures/metrics/untyped_gauge.json @@ -38,12 +38,6 @@ "value": { "stringValue": "13" } - }, - { - "key": "prometheus.googleapis.com/internal/untyped_metric", - "value": { - "stringValue": "true" - } } ], "startTimeUnixNano": "1649443416286000000", @@ -51,7 +45,15 @@ "asDouble": 3 } ] - } + }, + "metadata": [ + { + "key": "prometheus.type", + "value": { + "stringValue": "unknown" + } + } + ] } ] } diff --git a/exporter/collector/integrationtest/testdata/fixtures/metrics/untyped_gauge_expect.json b/exporter/collector/integrationtest/testdata/fixtures/metrics/untyped_gauge_expect.json index 9fdd513c2..7ef3cd479 100644 --- a/exporter/collector/integrationtest/testdata/fixtures/metrics/untyped_gauge_expect.json +++ b/exporter/collector/integrationtest/testdata/fixtures/metrics/untyped_gauge_expect.json @@ -7,8 +7,7 @@ "metric": { "type": "workload.googleapis.com/fake_untyped_metric", "labels": { - "ex_com_lemons_untyped": "13", - "prometheus_googleapis_com_internal_untyped_metric": "true" + "ex_com_lemons_untyped": "13" } }, "resource": { @@ -45,9 +44,6 @@ "labels": [ { "key": "ex_com_lemons_untyped" - }, - { - "key": "prometheus_googleapis_com_internal_untyped_metric" } ], "metricKind": "GAUGE",