diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md index c15f7551341..057ee8ef37a 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md @@ -2,8 +2,8 @@ ## Unreleased -* Updated [Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md). - to v1.21.0. This library can emit either old, new, or both attributes. +* Updated Semantic Conventions to [v1.21.0](https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md). + This library can emit either old, new, or both attributes. Users can control which attributes are emitted by setting the environment variable `OTEL_SEMCONV_STABILITY_OPT_IN`. ([#4537](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4537)) diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs index 7d72f6e8808..6b4e350bb38 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs @@ -229,7 +229,7 @@ public void OnStartActivity(Activity activity, object payload) } } - // see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md + // see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md if (this.emitNewAttributes) { if (request.Host.HasValue) diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInMetricsListener.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInMetricsListener.cs index fa9a3cf4ba9..e9522c1c06d 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInMetricsListener.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInMetricsListener.cs @@ -103,7 +103,7 @@ public override void OnEventWritten(string name, object payload) } } - // see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md + // see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md if (this.emitNewAttributes) { tags.Add(new KeyValuePair(SemanticConventions.AttributeNetworkProtocolVersion, HttpTagHelper.GetFlavorTagValueFromProtocol(context.Request.Protocol))); diff --git a/src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md index 850942e40bc..04e6d0fe3d2 100644 --- a/src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md @@ -2,8 +2,8 @@ ## Unreleased -* Updated [Http Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md). - to v1.21.0. This library can emit either old, new, or both attributes. +* Updated Semantic Conventions to [v1.21.0](https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md). + This library can emit either old, new, or both attributes. Users can control which attributes are emitted by setting the environment variable `OTEL_SEMCONV_STABILITY_OPT_IN`. ([#4538](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4538)) diff --git a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs index f8044e6dec1..bff2273f19f 100644 --- a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs +++ b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs @@ -179,7 +179,7 @@ public void OnStartActivity(Activity activity, object payload) activity.SetTag(SemanticConventions.AttributeHttpFlavor, HttpTagHelper.GetFlavorTagValueFromProtocolVersion(request.Version)); } - // see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md + // see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md if (this.emitNewAttributes) { activity.SetTag(SemanticConventions.AttributeHttpRequestMethod, HttpTagHelper.GetNameForHttpMethod(request.Method)); diff --git a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs index 0310ea86dad..7154335e783 100644 --- a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs +++ b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs @@ -79,7 +79,7 @@ public override void OnEventWritten(string name, object payload) } } - // see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md + // see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md if (this.emitNewAttributes) { tags.Add(new KeyValuePair(SemanticConventions.AttributeHttpRequestMethod, HttpTagHelper.GetNameForHttpMethod(request.Method))); diff --git a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpWebRequestActivitySource.netfx.cs b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpWebRequestActivitySource.netfx.cs index 59928bad4a4..50bf0abd76d 100644 --- a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpWebRequestActivitySource.netfx.cs +++ b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpWebRequestActivitySource.netfx.cs @@ -129,7 +129,7 @@ private static void AddRequestTagsAndInstrumentRequest(HttpWebRequest request, A activity.SetTag(SemanticConventions.AttributeHttpFlavor, HttpTagHelper.GetFlavorTagValueFromProtocolVersion(request.ProtocolVersion)); } - // see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md + // see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md if (emitNewAttributes) { activity.SetTag(SemanticConventions.AttributeHttpRequestMethod, request.Method); diff --git a/src/OpenTelemetry.Instrumentation.SqlClient/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.SqlClient/CHANGELOG.md index e48101abf4b..b2aef656dde 100644 --- a/src/OpenTelemetry.Instrumentation.SqlClient/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.SqlClient/CHANGELOG.md @@ -2,8 +2,8 @@ ## Unreleased -* Updated [Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md) - to v1.21.0. This library can emit either old, new, or both attributes. +* Updated Semantic Conventions to [v1.21.0](https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/database/database-spans.md) + This library can emit either old, new, or both attributes. Users can control which attributes are emitted by setting the environment variable `OTEL_SEMCONV_STABILITY_OPT_IN`. ([#4644](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4644)) diff --git a/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentationOptions.cs b/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentationOptions.cs index 9c88d6e0e5d..2ce6817baed 100644 --- a/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentationOptions.cs +++ b/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentationOptions.cs @@ -331,7 +331,7 @@ internal void AddConnectionLevelDetailsToActivity(string dataSource, Activity sq } } - // see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md + // see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/database/database-spans.md if (this.emitNewAttributes) { if (!string.IsNullOrEmpty(connectionDetails.ServerHostName)) diff --git a/src/Shared/HttpSemanticConventionHelper.cs b/src/Shared/HttpSemanticConventionHelper.cs index 0f2c7157e99..0e4b2f959f0 100644 --- a/src/Shared/HttpSemanticConventionHelper.cs +++ b/src/Shared/HttpSemanticConventionHelper.cs @@ -28,7 +28,7 @@ namespace OpenTelemetry.Internal; /// Due to a breaking change in the semantic convention, affected instrumentation libraries /// must inspect an environment variable to determine which attributes to emit. /// This is expected to be removed when the instrumentation libraries reach Stable. -/// . +/// . /// internal static class HttpSemanticConventionHelper { diff --git a/src/Shared/SemanticConventions.cs b/src/Shared/SemanticConventions.cs index 8c292c64455..f7a8c28f9eb 100644 --- a/src/Shared/SemanticConventions.cs +++ b/src/Shared/SemanticConventions.cs @@ -112,8 +112,8 @@ internal static class SemanticConventions public const string AttributeExceptionStacktrace = "exception.stacktrace"; // v1.21.0 (unreleased as of this commit) - // https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md - // https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md + // https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md + // https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/database/database-spans.md public const string AttributeHttpRequestMethod = "http.request.method"; // replaces: "http.method" (AttributeHttpMethod) public const string AttributeHttpResponseStatusCode = "http.response.status_code"; // replaces: "http.status_code" (AttributeHttpStatusCode) public const string AttributeNetworkProtocolVersion = "network.protocol.version"; // replaces: "http.flavor" (AttributeHttpFlavor) diff --git a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTestsDupe.netfx.cs b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTestsDupe.netfx.cs index ec00ceb6373..4528f8562ce 100644 --- a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTestsDupe.netfx.cs +++ b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTestsDupe.netfx.cs @@ -35,7 +35,7 @@ namespace OpenTelemetry.Instrumentation.Http.Tests { // Tests for v1.21.0 Semantic Conventions for Http spans - // see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md + // see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md // These tests emit both the new and older attributes. // This test class can be deleted when this library is GA. public class HttpWebRequestActivitySourceTestsDupe : IDisposable diff --git a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTestsNew.netfx.cs b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTestsNew.netfx.cs index 7e22da99fea..f0d4a75b3cd 100644 --- a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTestsNew.netfx.cs +++ b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTestsNew.netfx.cs @@ -35,7 +35,7 @@ namespace OpenTelemetry.Instrumentation.Http.Tests { // Tests for v1.21.0 Semantic Conventions for Http spans - // see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md + // see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md // These tests emit the new attributes. // This test class can replace the other class when this library is GA. public class HttpWebRequestActivitySourceTestsNew : IDisposable diff --git a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientInstrumentationOptionsTests.cs b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientInstrumentationOptionsTests.cs index 0a5ae328837..55576a5e96a 100644 --- a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientInstrumentationOptionsTests.cs +++ b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientInstrumentationOptionsTests.cs @@ -106,7 +106,7 @@ public void SqlClientInstrumentationOptions_EnableConnectionLevelAttributes( } // Tests for v1.21.0 Semantic Conventions for database client calls. - // see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md + // see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/database/database-spans.md // This test emits the new attributes. // This test method can replace the other (old) test method when this library is GA. [Theory] @@ -151,7 +151,7 @@ public void SqlClientInstrumentationOptions_EnableConnectionLevelAttributes_New( } // Tests for v1.21.0 Semantic Conventions for database client calls. - // see the spec https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md + // see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/database/database-spans.md // This test emits both the new and older attributes. // This test method can be deleted when this library is GA. [Theory]