From 06d623bf5a4b70e1f3d4ad18b3cbe6f568b7ac75 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Fri, 22 Apr 2022 09:23:39 -0700 Subject: [PATCH] Remove net5.0 target from aspnet core instrumentation (#3223) --- .../.publicApi/net5.0/PublicAPI.Shipped.txt | 0 .../.publicApi/net5.0/PublicAPI.Unshipped.txt | 14 -------------- .../AspNetCoreInstrumentationOptions.cs | 2 +- .../CHANGELOG.md | 5 +++++ ...OpenTelemetry.Instrumentation.AspNetCore.csproj | 8 ++------ .../BasicTests.cs | 3 --- .../DependencyInjectionConfigTests.cs | 3 --- ...RequestsCollectionsIsAccordingToTheSpecTests.cs | 3 --- .../MetricTests.cs | 3 --- ...lemetry.Instrumentation.AspNetCore.Tests.csproj | 7 +------ 10 files changed, 9 insertions(+), 39 deletions(-) delete mode 100644 src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net5.0/PublicAPI.Shipped.txt delete mode 100644 src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net5.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net5.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net5.0/PublicAPI.Shipped.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net5.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net5.0/PublicAPI.Unshipped.txt deleted file mode 100644 index fb182712e..000000000 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net5.0/PublicAPI.Unshipped.txt +++ /dev/null @@ -1,14 +0,0 @@ -OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions -OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions.AspNetCoreInstrumentationOptions() -> void -OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions.EnableGrpcAspNetCoreSupport.get -> bool -OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions.EnableGrpcAspNetCoreSupport.set -> void -OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions.Enrich.get -> System.Action -OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions.Enrich.set -> void -OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions.Filter.get -> System.Func -OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions.Filter.set -> void -OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions.RecordException.get -> bool -OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions.RecordException.set -> void -OpenTelemetry.Metrics.MeterProviderBuilderExtensions -OpenTelemetry.Trace.TracerProviderBuilderExtensions -static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Metrics.MeterProviderBuilder builder) -> OpenTelemetry.Metrics.MeterProviderBuilder -static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action configureAspNetCoreInstrumentationOptions = null) -> OpenTelemetry.Trace.TracerProviderBuilder diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs index 7bd2f7c1e..ac30d75eb 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs @@ -52,7 +52,7 @@ namespace OpenTelemetry.Instrumentation.AspNetCore /// public bool RecordException { get; set; } -#if NETSTANDARD2_1 || NETCOREAPP3_1 || NET5_0_OR_GREATER +#if NETSTANDARD2_1 || NETCOREAPP3_1 || NET6_0_OR_GREATER /// /// Gets or sets a value indicating whether RPC attributes are added to an Activity when using Grpc.AspNetCore. Default is true. /// diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md index e6170d704..9738193c9 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +* Removes net5.0 target as .NET 5.0 is going out + of support. The package keeps netstandard2.1 target, so it + can still be used with .NET5.0 apps. + ([#3147](https://github.com/open-telemetry/opentelemetry-dotnet/issues/3147)) + ## 1.0.0-rc9.3 Released 2022-Apr-15 diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj b/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj index 41777c8eb..82732cdb5 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj @@ -1,7 +1,7 @@ - + - net6.0;net5.0;netcoreapp3.1;netstandard2.1;netstandard2.0 + net6.0;netcoreapp3.1;netstandard2.1;netstandard2.0 ASP.NET Core instrumentation for OpenTelemetry .NET $(PackageTags);distributed-tracing;AspNetCore true @@ -33,10 +33,6 @@ - - - - diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/BasicTests.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/BasicTests.cs index 1c2b4174d..b3785d63c 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/BasicTests.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/BasicTests.cs @@ -35,9 +35,6 @@ using OpenTelemetry.Trace; #if NETCOREAPP3_1 using TestApp.AspNetCore._3._1; #endif -#if NET5_0 -using TestApp.AspNetCore._5._0; -#endif #if NET6_0 using TestApp.AspNetCore._6._0; #endif diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/DependencyInjectionConfigTests.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/DependencyInjectionConfigTests.cs index 9441adfeb..7706854e7 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/DependencyInjectionConfigTests.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/DependencyInjectionConfigTests.cs @@ -21,9 +21,6 @@ using OpenTelemetry.Trace; #if NETCOREAPP3_1 using TestApp.AspNetCore._3._1; #endif -#if NET5_0 -using TestApp.AspNetCore._5._0; -#endif #if NET6_0 using TestApp.AspNetCore._6._0; #endif diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/IncomingRequestsCollectionsIsAccordingToTheSpecTests.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/IncomingRequestsCollectionsIsAccordingToTheSpecTests.cs index 371784311..08d6feeea 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/IncomingRequestsCollectionsIsAccordingToTheSpecTests.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/IncomingRequestsCollectionsIsAccordingToTheSpecTests.cs @@ -28,9 +28,6 @@ using OpenTelemetry.Trace; #if NETCOREAPP3_1 using TestApp.AspNetCore._3._1; #endif -#if NET5_0 -using TestApp.AspNetCore._5._0; -#endif #if NET6_0 using TestApp.AspNetCore._6._0; #endif diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/MetricTests.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/MetricTests.cs index e478bfde0..87cc85615 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/MetricTests.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/MetricTests.cs @@ -24,9 +24,6 @@ using OpenTelemetry.Trace; #if NETCOREAPP3_1 using TestApp.AspNetCore._3._1; #endif -#if NET5_0 -using TestApp.AspNetCore._5._0; -#endif #if NET6_0 using TestApp.AspNetCore._6._0; #endif diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj index 68d564b52..003cf214a 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for OpenTelemetry ASP.NET Core instrumentation - net6.0;net5.0;netcoreapp3.1 + net6.0;netcoreapp3.1 @@ -32,11 +32,6 @@ - - - - -