From 8ee8ecac8301aa0d985dfd25485258940f5a89fe Mon Sep 17 00:00:00 2001 From: Narcis Gemene <7252787+narcis96@users.noreply.github.com> Date: Tue, 24 Sep 2024 19:29:57 +0300 Subject: [PATCH] datadogconnector: migrate to latest semconv version (#35269) Description: The version of semconv is upgraded from to v1.17.0 and v1.5.0 to v1.27.0 Link to tracking Issue: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/22095 Testing: Tests passed Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- connector/datadogconnector/connector.go | 2 +- connector/datadogconnector/connector_native_test.go | 5 ++--- connector/datadogconnector/connector_test.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/connector/datadogconnector/connector.go b/connector/datadogconnector/connector.go index 33aed6d20e1f..50e01a3b41c2 100644 --- a/connector/datadogconnector/connector.go +++ b/connector/datadogconnector/connector.go @@ -21,7 +21,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" - semconv "go.opentelemetry.io/collector/semconv/v1.17.0" + semconv "go.opentelemetry.io/collector/semconv/v1.27.0" "go.opentelemetry.io/otel/metric/noop" "go.uber.org/zap" ) diff --git a/connector/datadogconnector/connector_native_test.go b/connector/datadogconnector/connector_native_test.go index 991565941eaa..dc3c67c2f093 100644 --- a/connector/datadogconnector/connector_native_test.go +++ b/connector/datadogconnector/connector_native_test.go @@ -18,8 +18,7 @@ import ( "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/pdata/ptrace" - conventions127 "go.opentelemetry.io/collector/semconv/v1.27.0" - semconv "go.opentelemetry.io/collector/semconv/v1.5.0" + semconv "go.opentelemetry.io/collector/semconv/v1.27.0" "go.uber.org/zap" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/testing/protocmp" @@ -146,7 +145,7 @@ func TestMeasuredAndClientKindNative(t *testing.T) { td := ptrace.NewTraces() res := td.ResourceSpans().AppendEmpty().Resource() res.Attributes().PutStr("service.name", "svc") - res.Attributes().PutStr(conventions127.AttributeDeploymentEnvironmentName, "my-env") + res.Attributes().PutStr(semconv.AttributeDeploymentEnvironmentName, "my-env") ss := td.ResourceSpans().At(0).ScopeSpans().AppendEmpty().Spans() // Root span diff --git a/connector/datadogconnector/connector_test.go b/connector/datadogconnector/connector_test.go index 9a3bfe143122..71ca2db0e58d 100644 --- a/connector/datadogconnector/connector_test.go +++ b/connector/datadogconnector/connector_test.go @@ -21,7 +21,7 @@ import ( "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" - semconv "go.opentelemetry.io/collector/semconv/v1.5.0" + semconv "go.opentelemetry.io/collector/semconv/v1.27.0" "go.uber.org/zap" "google.golang.org/protobuf/proto" )