From f6b7e119a63845684a8e7576c486af43389f8af3 Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Mon, 22 Jan 2024 09:02:12 -0800 Subject: [PATCH 1/3] Fix changelog entry and remove package reference --- src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md | 6 ++++++ src/OpenTelemetry/CHANGELOG.md | 6 ------ test/Directory.Packages.props | 1 - .../Controllers/ChildActivityController.cs | 2 +- test/TestApp.AspNetCore/TestApp.AspNetCore.csproj | 1 - 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md index df628f13cc3..270b518fd55 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +* Fixed an issue where the created activity from ASP.NET Core was replaced + with a new one. This replacement should only happen when the activity context + from the used propagator has a different trace id, parent span id or trace + state compared to the current activity. For details see: + [#5136](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5136) + ## 1.7.0 Released 2023-Dec-13 diff --git a/src/OpenTelemetry/CHANGELOG.md b/src/OpenTelemetry/CHANGELOG.md index 9434d7218bd..3809ccee889 100644 --- a/src/OpenTelemetry/CHANGELOG.md +++ b/src/OpenTelemetry/CHANGELOG.md @@ -9,12 +9,6 @@ upgrading. For details see: [#5169](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5169) -* Fixed an issue where the created activity from ASP.NET Core was replaced - with a new one. This replacement should only happen when the activity context - from the used propagator has a different trace id, parent span id or trace - state compared to the current activity. For details see: - [#5136](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5136) - * Fixed an issue where `SimpleExemplarReservoir` was not resetting internal state for cumulative temporality. [#5230](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5230) diff --git a/test/Directory.Packages.props b/test/Directory.Packages.props index ba4c13aaba5..575224321a8 100644 --- a/test/Directory.Packages.props +++ b/test/Directory.Packages.props @@ -4,6 +4,5 @@ - diff --git a/test/TestApp.AspNetCore/Controllers/ChildActivityController.cs b/test/TestApp.AspNetCore/Controllers/ChildActivityController.cs index a9fe9504ebd..b55927000f3 100644 --- a/test/TestApp.AspNetCore/Controllers/ChildActivityController.cs +++ b/test/TestApp.AspNetCore/Controllers/ChildActivityController.cs @@ -40,7 +40,7 @@ public IReadOnlyDictionary GetChildActivityBaggageContext() [Route("api/GetActivityEquality")] public bool GetActivityEquality() { - var activity = this.HttpContext.Features.GetRequiredFeature().Activity; + var activity = this.HttpContext.Features.Get()?.Activity; var equal = Activity.Current == activity; return equal; } diff --git a/test/TestApp.AspNetCore/TestApp.AspNetCore.csproj b/test/TestApp.AspNetCore/TestApp.AspNetCore.csproj index 6ee1b6dece4..93a3a0a972d 100644 --- a/test/TestApp.AspNetCore/TestApp.AspNetCore.csproj +++ b/test/TestApp.AspNetCore/TestApp.AspNetCore.csproj @@ -5,7 +5,6 @@ - From bc23dbfc0c7b0f760498ba82f2c9010274311a58 Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Mon, 22 Jan 2024 10:20:13 -0800 Subject: [PATCH 2/3] reword --- .../CHANGELOG.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md index 270b518fd55..0d1001ffc89 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md @@ -2,10 +2,11 @@ ## Unreleased -* Fixed an issue where the created activity from ASP.NET Core was replaced - with a new one. This replacement should only happen when the activity context - from the used propagator has a different trace id, parent span id or trace - state compared to the current activity. For details see: +* Fixed an issue where the activity instance returned by `Activity.Current` was + different than instance obtained from `IHttpActivityFeature.Activity`. Check + out issue + [#4466](https://github.com/open-telemetry/opentelemetry-dotnet/issues/4466) + for more details. [#5136](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5136) ## 1.7.0 From a6f3e4b2753db2ef0303e1516305d0c7934d6664 Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Mon, 22 Jan 2024 11:19:42 -0800 Subject: [PATCH 3/3] reword --- src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md index 0d1001ffc89..03374b1cd94 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md @@ -2,11 +2,10 @@ ## Unreleased -* Fixed an issue where the activity instance returned by `Activity.Current` was - different than instance obtained from `IHttpActivityFeature.Activity`. Check - out issue +* Fixed issue [#4466](https://github.com/open-telemetry/opentelemetry-dotnet/issues/4466) - for more details. + where the activity instance returned by `Activity.Current` was different than + instance obtained from `IHttpActivityFeature.Activity`. [#5136](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5136) ## 1.7.0