From 970d286784fb7163cf829872a5dc4f9095d9924d Mon Sep 17 00:00:00 2001 From: philip pittle Date: Thu, 19 Dec 2024 14:32:59 -0800 Subject: [PATCH] change strategy - beta version will default to Legacy (ie no change in semantic convention output). There will be a fast follow PR to remove Legacy in preparation for an RC. --- .../.publicApi/PublicAPI.Unshipped.txt | 1 + .../.publicApi/PublicAPI.Unshipped.txt | 1 + .../.publicApi/PublicAPI.Unshipped.txt | 1 + src/Shared/AWS/AWSSemanticConventions.cs | 11 ++++++++++- src/Shared/AWS/SemanticConventionVersion.cs | 12 ++++++++++++ 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/OpenTelemetry.Instrumentation.AWS/.publicApi/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Instrumentation.AWS/.publicApi/PublicAPI.Unshipped.txt index 1d865f3be0..d9f3466a01 100644 --- a/src/OpenTelemetry.Instrumentation.AWS/.publicApi/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Instrumentation.AWS/.publicApi/PublicAPI.Unshipped.txt @@ -1,5 +1,6 @@ #nullable enable OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion +OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion.Legacy = -1 -> OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion.Latest = 0 -> OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion.V1_29_0 = 2 -> OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion.V1_28_0 = 1 -> OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion diff --git a/src/OpenTelemetry.Instrumentation.AWSLambda/.publicApi/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Instrumentation.AWSLambda/.publicApi/PublicAPI.Unshipped.txt index b71913f746..7afa5bd534 100644 --- a/src/OpenTelemetry.Instrumentation.AWSLambda/.publicApi/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Instrumentation.AWSLambda/.publicApi/PublicAPI.Unshipped.txt @@ -1,4 +1,5 @@ #nullable enable +OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion.Legacy = -1 -> OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion.Latest = 0 -> OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion.V1_29_0 = 2 -> OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion diff --git a/src/OpenTelemetry.Resources.AWS/.publicApi/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Resources.AWS/.publicApi/PublicAPI.Unshipped.txt index 958bfbb929..34d384331a 100644 --- a/src/OpenTelemetry.Resources.AWS/.publicApi/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Resources.AWS/.publicApi/PublicAPI.Unshipped.txt @@ -1,4 +1,5 @@ OpenTelemetry.Resources.AWS.SemanticConventionVersion +OpenTelemetry.Resources.AWS.SemanticConventionVersion.Legacy = -1 -> OpenTelemetry.Resources.AWS.SemanticConventionVersion OpenTelemetry.Resources.AWS.SemanticConventionVersion.Latest = 0 -> OpenTelemetry.Resources.AWS.SemanticConventionVersion OpenTelemetry.Resources.AWS.SemanticConventionVersion.V1_29_0 = 2 -> OpenTelemetry.Resources.AWS.SemanticConventionVersion OpenTelemetry.Resources.AWS.SemanticConventionVersion.V1_28_0 = 1 -> OpenTelemetry.Resources.AWS.SemanticConventionVersion diff --git a/src/Shared/AWS/AWSSemanticConventions.cs b/src/Shared/AWS/AWSSemanticConventions.cs index c6c771dc99..2c263069d9 100644 --- a/src/Shared/AWS/AWSSemanticConventions.cs +++ b/src/Shared/AWS/AWSSemanticConventions.cs @@ -19,6 +19,9 @@ #pragma warning disable SA1201 #pragma warning disable SA1623 +// disable obsolete warning - remove in RC +#pragma warning disable CS0618 + namespace OpenTelemetry.AWS; /// @@ -66,7 +69,10 @@ internal partial class AWSSemanticConventions /// Per SemanticConventionVersion, default should stay as /// until next major version bump. /// - internal const SemanticConventionVersion DefaultSemanticConventionVersion = SemanticConventionVersion.V1_28_0; + internal const SemanticConventionVersion DefaultSemanticConventionVersion = SemanticConventionVersion.Legacy; + + // RC Release - change to + //SemanticConventionVersion.V1_28_0; private readonly SemanticConventionVersion semanticConventionVersion; @@ -488,6 +494,9 @@ private AWSSemanticConventionsBase GetSemanticConventionVersion() case SemanticConventionVersion.V1_28_0: return new AWSSemanticConventions_V1_28_0(); + case SemanticConventionVersion.Legacy: + return new AWSSemanticConventionsLegacy(); + default: throw new InvalidEnumArgumentException( argumentName: nameof(SemanticConventionVersion), diff --git a/src/Shared/AWS/SemanticConventionVersion.cs b/src/Shared/AWS/SemanticConventionVersion.cs index 53c6156878..e00e600699 100644 --- a/src/Shared/AWS/SemanticConventionVersion.cs +++ b/src/Shared/AWS/SemanticConventionVersion.cs @@ -73,6 +73,18 @@ public enum SemanticConventionVersion /// Latest = 0, + /// + /// Represents the mixture of Semantic Conventions used in OpenTelemetry.*.AWS libraries + /// in 1.10.0-beta.x. + /// + /// This allows users to upgrade to the latest beta nuget package without experiencing a change in + /// Semantic Convention output. Then there is an opportunity for users to trial . + /// + /// This option will be REMOVED in the next Release Candidate. + /// + [Obsolete("This will be removed in the 1.10.0-RC", error: false)] + Legacy = -1, + /// /// Pin to the specific state of all Semantic Conventions as of the 1.28.0 /// release. See: