Skip to content

Commit

Permalink
drop the suffix expiremental in enum values and instead metnion exper…
Browse files Browse the repository at this point in the history
…imental status in documentation
  • Loading branch information
ppittle committed Dec 19, 2024
1 parent 3b429a5 commit 2b9780c
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#nullable enable
OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion
OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion.Latest = 0 -> OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion
OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion.V1_29_0_Experimental = 2 -> OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion
OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion.V1_28_0_Experimental = 1 -> 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
OpenTelemetry.Instrumentation.AWS.AWSClientInstrumentationOptions
OpenTelemetry.Instrumentation.AWS.AWSClientInstrumentationOptions.AWSClientInstrumentationOptions() -> void
OpenTelemetry.Instrumentation.AWS.AWSClientInstrumentationOptions.SemanticConventionVersion.get -> OpenTelemetry.Instrumentation.AWS.SemanticConventionVersion
Expand Down
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Instrumentation.AWS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ emit the GET as `"http.request.method"`.
Future versions the OpenTelemetry.*.AWS libraries will include updates to the
Semantic Convention, which may break compatibility with a previous version.

The default will remain as `V1_28_0_Experimental` until the next major version bump.
The default will remain as `V1_28_0` until the next major version bump.

To opt in to automatic upgrades, you can use `SemanticConventionVersion.Latest`
or you can specify a specific version:
Expand All @@ -70,7 +70,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddOpenTelemetryTracing((builder) => builder
.AddAWSInstrumentation(opt => {
// pin to a specific Semantic Convention version
opt.SemanticConventionVersion = SemanticConventionVersion.V1_29_0_Experimental;
opt.SemanticConventionVersion = SemanticConventionVersion.V1_29_0;
});
}
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#nullable enable
OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion
OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion.Latest = 0 -> OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion
OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion.V1_29_0_Experimental = 2 -> OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion
OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion.V1_28_0_Experimental = 1 -> OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion
OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion.V1_29_0 = 2 -> OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion
OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion.V1_28_0 = 1 -> OpenTelemetry.Instrumentation.AWSLambda.SemanticConventionVersion
OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaInstrumentationOptions
OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaInstrumentationOptions.AWSLambdaInstrumentationOptions() -> void
OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaInstrumentationOptions.DisableAwsXRayContextExtraction.get -> bool
Expand Down
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Instrumentation.AWSLambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Future versions of OpenTelemetry.Instrumentation.AWSLambda library will include
updates to the Semantic Convention, which may break compatibility with a
previous version.

The default will remain as `V1_28_0_Experimental` until the next major version bump.
The default will remain as `V1_28_0` until the next major version bump.

To opt in to automatic upgrades, you can use `SemanticConventionVersion.Latest`
or you can specify a specific version:
Expand All @@ -170,7 +170,7 @@ or you can specify a specific version:
.AddAWSLambdaConfigurations(opt =>
{
// pin to a specific Semantic Convention version
opt.SemanticConventionVersion = SemanticConventionVersion.V1_29_0_Experimental;
opt.SemanticConventionVersion = SemanticConventionVersion.V1_29_0;
})
.Build()!);
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OpenTelemetry.Resources.AWS.SemanticConventionVersion
OpenTelemetry.Resources.AWS.SemanticConventionVersion.Latest = 0 -> OpenTelemetry.Resources.AWS.SemanticConventionVersion
OpenTelemetry.Resources.AWS.SemanticConventionVersion.V1_29_0_Experimental = 2 -> OpenTelemetry.Resources.AWS.SemanticConventionVersion
OpenTelemetry.Resources.AWS.SemanticConventionVersion.V1_28_0_Experimental = 1 -> 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
OpenTelemetry.Resources.AWS.AWSResourceBuilderOptions
OpenTelemetry.Resources.AWS.AWSResourceBuilderOptions.AWSResourceBuilderOptions() -> void
OpenTelemetry.Resources.AWS.AWSResourceBuilderOptions.SemanticConventionVersion.get -> OpenTelemetry.Resources.AWS.SemanticConventionVersion
Expand Down
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Resources.AWS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ emit the GET as `"http.request.method"`.
Future versions the OpenTelemetry.*.AWS libraries will include updates to the
Semantic Convention, which may break compatibility with a previous version.

The default will remain as `V1_28_0_Experimental` until the next major version bump.
The default will remain as `V1_28_0` until the next major version bump.

To opt in to automatic upgrades, you can use `SemanticConventionVersion.Latest`
or you can specify a specific version:
Expand All @@ -96,7 +96,7 @@ using var tracerProvider = Sdk.CreateTracerProviderBuilder()
.ConfigureResource(resource => resource.AddAWSEC2Detector(
opt => {
// pin to a specific Semantic Convention version
opt.SemanticConventionVersion = SemanticConventionVersion.V1_29_0_Experimental;
opt.SemanticConventionVersion = SemanticConventionVersion.V1_29_0;
}
))
// other configurations
Expand Down
8 changes: 4 additions & 4 deletions src/Shared/AWS/AWSSemanticConventions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ internal partial class AWSSemanticConventions
/// </summary>
/// <remarks>
/// Per SemanticConventionVersion, default should stay as
/// <see cref="SemanticConventionVersion.V1_28_0_Experimental"/> until next major version bump.
/// <see cref="SemanticConventionVersion.V1_28_0"/> until next major version bump.
/// </remarks>
internal const SemanticConventionVersion DefaultSemanticConventionVersion = SemanticConventionVersion.V1_28_0_Experimental;
internal const SemanticConventionVersion DefaultSemanticConventionVersion = SemanticConventionVersion.V1_28_0;

private readonly SemanticConventionVersion semanticConventionVersion;

Expand Down Expand Up @@ -482,10 +482,10 @@ private AWSSemanticConventionsBase GetSemanticConventionVersion()
switch (this.semanticConventionVersion)
{
case SemanticConventionVersion.Latest:
case SemanticConventionVersion.V1_29_0_Experimental:
case SemanticConventionVersion.V1_29_0:
return new AWSSemanticConventions_V1_29_0();

case SemanticConventionVersion.V1_28_0_Experimental:
case SemanticConventionVersion.V1_28_0:
return new AWSSemanticConventions_V1_28_0();

default:
Expand Down
12 changes: 8 additions & 4 deletions src/Shared/AWS/SemanticConventionVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace OpenTelemetry.Resources.AWS;
/// version.
/// </para>
/// <para>
/// The default will remain as <see cref="V1_28_0_Experimental"/> until the next major version
/// The default will remain as <see cref="V1_28_0"/> until the next major version
/// bump.
/// </para>
/// <para>
Expand All @@ -50,7 +50,7 @@ namespace OpenTelemetry.Resources.AWS;
/// using (var tracerProvider = Sdk.CreateTracerProviderBuilder()
/// .AddAWSLambdaConfigurations(opt =>
/// {
/// opt.SemanticConventionVersion = SemanticConventionVersion.V1_29_0_Experimental;
/// opt.SemanticConventionVersion = SemanticConventionVersion.V1_29_0;
/// })
/// .Build()!);
/// ]]>
Expand All @@ -77,13 +77,17 @@ public enum SemanticConventionVersion
/// Pin to the specific state of all Semantic Conventions as of the 1.28.0
/// release. See:
/// https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.28.0.
/// <para />
/// This version contains conventions marked Experimental and may change in future versions.
/// </summary>
V1_28_0_Experimental = 1,
V1_28_0 = 1,

/// <summary>
/// Pin to the specific state of all Semantic Conventions as of the 1.29.0
/// release. See:
/// https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.29.0.
/// <para />
/// This version contains conventions marked Experimental and may change in future versions.
/// </summary>
V1_29_0_Experimental = 2,
V1_29_0 = 2,
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public sealed class AWSClientInstrumentationOptionsTests
[Fact]
public void CanUseSemanticConvention_V1_28_0()
{
var semanticVersion = SemanticConventionVersion.V1_28_0_Experimental;
var semanticVersion = SemanticConventionVersion.V1_28_0;

var tags = this.GetActivityTags(semanticVersion);

Expand All @@ -36,7 +36,7 @@ public void CanUseSemanticConvention_V1_28_0()
[Fact]
public void CanUseSemanticConvention_V1_29_0()
{
var semanticVersion = SemanticConventionVersion.V1_29_0_Experimental;
var semanticVersion = SemanticConventionVersion.V1_29_0;

var tags = this.GetActivityTags(semanticVersion);

Expand Down

0 comments on commit 2b9780c

Please sign in to comment.