From aa95e2143ff150ca66e0971f128288bccc316198 Mon Sep 17 00:00:00 2001 From: Narcis Gemene <7252787+narcis96@users.noreply.github.com> Date: Wed, 25 Sep 2024 02:49:43 +0300 Subject: [PATCH] azuremonitorexporter: migrate to newer semconv versions (#35350) Description: The version of semconv is upgraded from v1.6.1 to newer versions The semconv attributes' value have been compared using [go-otel-semconv-comparator](https://github.com/narcis96/go-otel-semconv-comparator) resulting in 0 diffs: - 1.7.0 version has been used if the no newer version contains all attributes used by the file (all attributes of 1.6.1 exists and have the same value inside 1.7.0) - 1.12.0 version has been used if the no newer version contains all attributes used by the file (all attributes of 1.6.1 exists and have the same value inside 1.12.0) - 1.27.0 version has been used if only if the file does _not_ contain _AttributeMessagingMessageID_ and _AttributeMessagingKafkaMessageKey_: otel_comp Link to tracking Issue: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/22095 Testing: Tests passed --- exporter/azuremonitorexporter/contracts_utils.go | 2 +- exporter/azuremonitorexporter/conventions.go | 2 +- exporter/azuremonitorexporter/conventions_test.go | 2 +- exporter/azuremonitorexporter/logexporter_test.go | 2 +- exporter/azuremonitorexporter/trace_to_envelope.go | 2 +- exporter/azuremonitorexporter/trace_to_envelope_test.go | 2 +- exporter/azuremonitorexporter/traceexporter_test.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exporter/azuremonitorexporter/contracts_utils.go b/exporter/azuremonitorexporter/contracts_utils.go index 188f04e13794..9b80287f22da 100644 --- a/exporter/azuremonitorexporter/contracts_utils.go +++ b/exporter/azuremonitorexporter/contracts_utils.go @@ -6,7 +6,7 @@ package azuremonitorexporter // import "github.com/open-telemetry/opentelemetry- import ( "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" "go.opentelemetry.io/collector/pdata/pcommon" // Applies resource attributes values to data properties - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.27.0" ) const ( diff --git a/exporter/azuremonitorexporter/conventions.go b/exporter/azuremonitorexporter/conventions.go index 21a2bc923448..e764a74f33fc 100644 --- a/exporter/azuremonitorexporter/conventions.go +++ b/exporter/azuremonitorexporter/conventions.go @@ -7,7 +7,7 @@ import ( "strconv" "go.opentelemetry.io/collector/pdata/pcommon" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.7.0" ) /* diff --git a/exporter/azuremonitorexporter/conventions_test.go b/exporter/azuremonitorexporter/conventions_test.go index 58486ddbbec6..50fd3ecc4a97 100644 --- a/exporter/azuremonitorexporter/conventions_test.go +++ b/exporter/azuremonitorexporter/conventions_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/pcommon" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.7.0" ) func TestHTTPAttributeMapping(t *testing.T) { diff --git a/exporter/azuremonitorexporter/logexporter_test.go b/exporter/azuremonitorexporter/logexporter_test.go index e13cc9c7260c..e6ade92105c9 100644 --- a/exporter/azuremonitorexporter/logexporter_test.go +++ b/exporter/azuremonitorexporter/logexporter_test.go @@ -17,7 +17,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.27.0" "go.uber.org/zap" ) diff --git a/exporter/azuremonitorexporter/trace_to_envelope.go b/exporter/azuremonitorexporter/trace_to_envelope.go index dc091ab227ca..0413dd8b5471 100644 --- a/exporter/azuremonitorexporter/trace_to_envelope.go +++ b/exporter/azuremonitorexporter/trace_to_envelope.go @@ -15,7 +15,7 @@ import ( "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.12.0" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil" diff --git a/exporter/azuremonitorexporter/trace_to_envelope_test.go b/exporter/azuremonitorexporter/trace_to_envelope_test.go index a0e212ef21a9..f3e27583e5a8 100644 --- a/exporter/azuremonitorexporter/trace_to_envelope_test.go +++ b/exporter/azuremonitorexporter/trace_to_envelope_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.12.0" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil" diff --git a/exporter/azuremonitorexporter/traceexporter_test.go b/exporter/azuremonitorexporter/traceexporter_test.go index aa0ae5aedab2..a4fc97be457d 100644 --- a/exporter/azuremonitorexporter/traceexporter_test.go +++ b/exporter/azuremonitorexporter/traceexporter_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/mock" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.27.0" "go.uber.org/zap" "golang.org/x/net/context" )