From 381567a76842a7b16c542c7f1c1e574fb8c19987 Mon Sep 17 00:00:00 2001 From: nityanandagohain Date: Wed, 21 Aug 2024 18:09:30 +0530 Subject: [PATCH] fix: move source_type to same level as cloud.platform --- exporter/clickhouselogsexporter/logsv2/fingerprint.go | 6 ++++-- exporter/clickhouselogsexporter/logsv2/fingerprint_test.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/exporter/clickhouselogsexporter/logsv2/fingerprint.go b/exporter/clickhouselogsexporter/logsv2/fingerprint.go index dfe86f73..9bb55666 100644 --- a/exporter/clickhouselogsexporter/logsv2/fingerprint.go +++ b/exporter/clickhouselogsexporter/logsv2/fingerprint.go @@ -50,7 +50,6 @@ func ResourceHierarchy() *DimensionHierarchyNode { return &DimensionHierarchyNode{ labels: []string{ "cloud.provider", - "source_type", }, subHierachies: []DimensionHierarchyNode{{ labels: []string{"cloud.account.id"}, @@ -65,7 +64,10 @@ func ResourceHierarchy() *DimensionHierarchyNode { }, subHierachies: []DimensionHierarchyNode{{ - labels: []string{"cloud.platform"}, + labels: []string{ + "cloud.platform", + "source_type", + }, subHierachies: []DimensionHierarchyNode{{ labels: []string{ diff --git a/exporter/clickhouselogsexporter/logsv2/fingerprint_test.go b/exporter/clickhouselogsexporter/logsv2/fingerprint_test.go index 5a61ea07..65f55086 100644 --- a/exporter/clickhouselogsexporter/logsv2/fingerprint_test.go +++ b/exporter/clickhouselogsexporter/logsv2/fingerprint_test.go @@ -30,7 +30,7 @@ func TestCalculateFingerprint(t *testing.T) { { Name: "Vector and gcp", ResourceAttrs: map[string]any{"gcp.project": "myproject", "source_type": "gcp", "random_key": "val"}, - FingerPrint: "source_type=gcp;gcp.project=myproject;hash=11162778839006855273", + FingerPrint: "gcp.project=myproject;source_type=gcp;hash=11162778839006855273", }, }