From 440b074b657e86e1399e30f65839770ab52ce43b Mon Sep 17 00:00:00 2001 From: liuhaoyang Date: Sun, 2 Jan 2022 21:53:17 +0800 Subject: [PATCH 1/9] upgrade grpc-tools and dotnet version --- .../SkyApm.Benchmark/SkyApm.Benchmark.csproj | 2 +- .../SkyApm.Sample.Frontend.csproj | 2 +- sample/SkyApm.Sample.GenericHost/Program.cs | 4 +- .../SkyApm.Sample.GenericHost.csproj | 9 ++-- .../SkyApm.Agent.AspNetCore.csproj | 2 +- .../SkyApm.Agent.GeneralHost.csproj | 47 ++++++++++--------- .../SkyApm.Agent.Hosting.csproj | 42 ++++++++++------- src/SkyApm.Core/SkyApm.Core.csproj | 2 +- .../SkyApm.Diagnostics.AspNetCore.csproj | 8 +++- .../SkyApm.Transport.Grpc.Protocol.csproj | 2 +- 10 files changed, 69 insertions(+), 51 deletions(-) diff --git a/benchmark/SkyApm.Benchmark/SkyApm.Benchmark.csproj b/benchmark/SkyApm.Benchmark/SkyApm.Benchmark.csproj index 37fbde9c..4830393c 100644 --- a/benchmark/SkyApm.Benchmark/SkyApm.Benchmark.csproj +++ b/benchmark/SkyApm.Benchmark/SkyApm.Benchmark.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1 + netcoreapp2.1;netcoreapp3.1;net5.0;net6.0 diff --git a/sample/SkyApm.Sample.Frontend/SkyApm.Sample.Frontend.csproj b/sample/SkyApm.Sample.Frontend/SkyApm.Sample.Frontend.csproj index c624656a..f8af9f6c 100644 --- a/sample/SkyApm.Sample.Frontend/SkyApm.Sample.Frontend.csproj +++ b/sample/SkyApm.Sample.Frontend/SkyApm.Sample.Frontend.csproj @@ -1,6 +1,6 @@  - netcoreapp2.1;netcoreapp3.0;netcoreapp3.1 + netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0 SkyApm.Sample.Backend diff --git a/sample/SkyApm.Sample.GenericHost/Program.cs b/sample/SkyApm.Sample.GenericHost/Program.cs index b54134e3..87509700 100644 --- a/sample/SkyApm.Sample.GenericHost/Program.cs +++ b/sample/SkyApm.Sample.GenericHost/Program.cs @@ -11,9 +11,9 @@ public static void Main(string[] args) CreateHostBuilder(args).Build().Run(); } - public static IHostBuilder CreateHostBuilder(string[] args) => + static IHostBuilder CreateHostBuilder(string[] args) => new HostBuilder() .ConfigureServices(services => services.AddHostedService()) - .AddSkyAPM(); + .AddSkyAPM(); } } \ No newline at end of file diff --git a/sample/SkyApm.Sample.GenericHost/SkyApm.Sample.GenericHost.csproj b/sample/SkyApm.Sample.GenericHost/SkyApm.Sample.GenericHost.csproj index c083f92d..3026095f 100644 --- a/sample/SkyApm.Sample.GenericHost/SkyApm.Sample.GenericHost.csproj +++ b/sample/SkyApm.Sample.GenericHost/SkyApm.Sample.GenericHost.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;netcoreapp3.1 + net6.0;netcoreapp3.1 Exe @@ -18,8 +18,11 @@ + + + - - + + \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNetCore/SkyApm.Agent.AspNetCore.csproj b/src/SkyApm.Agent.AspNetCore/SkyApm.Agent.AspNetCore.csproj index 61af1022..494b0785 100644 --- a/src/SkyApm.Agent.AspNetCore/SkyApm.Agent.AspNetCore.csproj +++ b/src/SkyApm.Agent.AspNetCore/SkyApm.Agent.AspNetCore.csproj @@ -9,7 +9,7 @@ SkyApm.Agent.AspNetCore - netstandard2.0;netcoreapp3.1 + netstandard2.0;netcoreapp3.1;net5.0;net6.0 diff --git a/src/SkyApm.Agent.GeneralHost/SkyApm.Agent.GeneralHost.csproj b/src/SkyApm.Agent.GeneralHost/SkyApm.Agent.GeneralHost.csproj index e1dc9e68..0d0c51ba 100644 --- a/src/SkyApm.Agent.GeneralHost/SkyApm.Agent.GeneralHost.csproj +++ b/src/SkyApm.Agent.GeneralHost/SkyApm.Agent.GeneralHost.csproj @@ -1,25 +1,28 @@ - - - $(Product) ASP.NET Core Agent. - $(PackagePrefix).Agent.GeneralHost - $(PackagePrefix).Agent.GeneralHost - $(PackagePrefix).Agent.GeneralHost - SkyWalking;APM - - - SkyApm.Agent.GeneralHost - netstandard2.0;netcoreapp3.1 - + + + $(Product) ASP.NET Core Agent. + $(PackagePrefix).Agent.GeneralHost + $(PackagePrefix).Agent.GeneralHost + $(PackagePrefix).Agent.GeneralHost + SkyWalking;APM + + + SkyApm.Agent.GeneralHost + netcoreapp3.1;net5.0;net6.0 + + + + + - - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/src/SkyApm.Agent.Hosting/SkyApm.Agent.Hosting.csproj b/src/SkyApm.Agent.Hosting/SkyApm.Agent.Hosting.csproj index 31e482de..e1161c22 100644 --- a/src/SkyApm.Agent.Hosting/SkyApm.Agent.Hosting.csproj +++ b/src/SkyApm.Agent.Hosting/SkyApm.Agent.Hosting.csproj @@ -1,5 +1,5 @@  - + $(Product) ASP.NET Core Agent. $(PackagePrefix).Agent.Hosting @@ -9,28 +9,34 @@ SkyApm.Agent.Hosting - netstandard2.0;netcoreapp3.1 + netstandard2.0;netcoreapp3.1;net5.0;net6.0 - + - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SkyApm.Core/SkyApm.Core.csproj b/src/SkyApm.Core/SkyApm.Core.csproj index 987c2ae5..838ed598 100644 --- a/src/SkyApm.Core/SkyApm.Core.csproj +++ b/src/SkyApm.Core/SkyApm.Core.csproj @@ -9,7 +9,7 @@ SkyApm - netstandard2.0;netcoreapp2.1;netcoreapp3.1 + netstandard2.0;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0 $(DefineConstants);SPAN diff --git a/src/SkyApm.Diagnostics.AspNetCore/SkyApm.Diagnostics.AspNetCore.csproj b/src/SkyApm.Diagnostics.AspNetCore/SkyApm.Diagnostics.AspNetCore.csproj index feee016a..38a0c276 100644 --- a/src/SkyApm.Diagnostics.AspNetCore/SkyApm.Diagnostics.AspNetCore.csproj +++ b/src/SkyApm.Diagnostics.AspNetCore/SkyApm.Diagnostics.AspNetCore.csproj @@ -5,7 +5,7 @@ $(PackagePrefix).Diagnostics.AspNetCore notifies Web Http requests. $(PackagePrefix).Diagnostics.AspNetCore - netstandard2.0;netstandard2.1;netcoreapp3.1 + netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Diagnostics.AspNetCore $(PackagePrefix).Diagnostics.AspNetCore SkyWalking;APM;Diagnostics;AspNetCore @@ -32,4 +32,10 @@ + + + + + + \ No newline at end of file diff --git a/src/SkyApm.Transport.Grpc.Protocol/SkyApm.Transport.Grpc.Protocol.csproj b/src/SkyApm.Transport.Grpc.Protocol/SkyApm.Transport.Grpc.Protocol.csproj index 887f6598..0eec5564 100644 --- a/src/SkyApm.Transport.Grpc.Protocol/SkyApm.Transport.Grpc.Protocol.csproj +++ b/src/SkyApm.Transport.Grpc.Protocol/SkyApm.Transport.Grpc.Protocol.csproj @@ -17,7 +17,7 @@ - + From 11cb366b24c530494f590638acddd03ac258c108 Mon Sep 17 00:00:00 2001 From: liuhaoyang Date: Sun, 2 Jan 2022 22:13:34 +0800 Subject: [PATCH 2/9] Update appveyor build os version --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 12582259..7eb963df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ version: '{build}' -os: Visual Studio 2019 +os: Visual Studio 2022 branches: only: - master From 99ad42cefc792c1c22fe1b5401f4ad7c9559c5f5 Mon Sep 17 00:00:00 2001 From: liuhaoyang Date: Sun, 2 Jan 2022 22:18:39 +0800 Subject: [PATCH 3/9] Updtae grpcServer version --- .../SkyApm.Sample.GrpcProto.csproj | 2 +- .../SkyApm.Sample.GrpcServer.csproj | 46 +++++++++++-------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/sample/grpc/SkyApm.Sample.GrpcProto/SkyApm.Sample.GrpcProto.csproj b/sample/grpc/SkyApm.Sample.GrpcProto/SkyApm.Sample.GrpcProto.csproj index f748e275..19debaed 100644 --- a/sample/grpc/SkyApm.Sample.GrpcProto/SkyApm.Sample.GrpcProto.csproj +++ b/sample/grpc/SkyApm.Sample.GrpcProto/SkyApm.Sample.GrpcProto.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/sample/grpc/SkyApm.Sample.GrpcServer/SkyApm.Sample.GrpcServer.csproj b/sample/grpc/SkyApm.Sample.GrpcServer/SkyApm.Sample.GrpcServer.csproj index 4baac714..8b6976f4 100644 --- a/sample/grpc/SkyApm.Sample.GrpcServer/SkyApm.Sample.GrpcServer.csproj +++ b/sample/grpc/SkyApm.Sample.GrpcServer/SkyApm.Sample.GrpcServer.csproj @@ -1,24 +1,30 @@  - - Exe - netcoreapp2.1;netcoreapp3.1 - + + Exe + netcoreapp2.1;netcoreapp3.1;net5.0;net6.0 + - - - Always - PreserveNewest - - - - - - - - - - - - + + + Always + PreserveNewest + + + + + + + + + + + + + + + + + + \ No newline at end of file From 09fa26c109ef96b78ebe6ccb5632df15a196b55e Mon Sep 17 00:00:00 2001 From: liuhaoyang Date: Sun, 2 Jan 2022 22:44:35 +0800 Subject: [PATCH 4/9] Fix MongoDB build --- .../SkyApm.Diagnostics.MongoDB.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SkyApm.Diagnostics.MongoDB/SkyApm.Diagnostics.MongoDB.csproj b/src/SkyApm.Diagnostics.MongoDB/SkyApm.Diagnostics.MongoDB.csproj index 97a403bf..69fab998 100644 --- a/src/SkyApm.Diagnostics.MongoDB/SkyApm.Diagnostics.MongoDB.csproj +++ b/src/SkyApm.Diagnostics.MongoDB/SkyApm.Diagnostics.MongoDB.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.0;netcoreapp3.1;net5.0;net6.0 From 3c87e8f176a7ad3b4c9da8c69231fc76e8bda5f2 Mon Sep 17 00:00:00 2001 From: liuhaoyang Date: Sun, 2 Jan 2022 22:54:38 +0800 Subject: [PATCH 5/9] Update ef project TargetFrameworks --- .../SkyApm.Diagnostics.EntityFrameworkCore.Npgsql.csproj | 2 +- .../SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql.csproj | 2 +- .../SkyApm.Diagnostics.EntityFrameworkCore.Sqlite.csproj | 2 +- .../SkyApm.Diagnostics.EntityFrameworkCore.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql.csproj b/src/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql.csproj index b48f98e3..466c0dd7 100644 --- a/src/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql.csproj +++ b/src/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.0;net5.0;net6.0 $(PackagePrefix).Diagnostics.EntityFrameworkCore.Npgsql diff --git a/src/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql.csproj b/src/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql.csproj index 58868360..ccd7726c 100644 --- a/src/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql.csproj +++ b/src/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.0;net5.0;net6.0 $(PackagePrefix).Diagnostics.EntityFrameworkCore.Pomelo.MySql diff --git a/src/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite.csproj b/src/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite.csproj index 3605d409..61a0112c 100644 --- a/src/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite.csproj +++ b/src/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.0;net5.0;net6.0 $(PackagePrefix).Diagnostics.EntityFrameworkCore.Sqlite diff --git a/src/SkyApm.Diagnostics.EntityFrameworkCore/SkyApm.Diagnostics.EntityFrameworkCore.csproj b/src/SkyApm.Diagnostics.EntityFrameworkCore/SkyApm.Diagnostics.EntityFrameworkCore.csproj index 817a0f6f..4eaffa9c 100644 --- a/src/SkyApm.Diagnostics.EntityFrameworkCore/SkyApm.Diagnostics.EntityFrameworkCore.csproj +++ b/src/SkyApm.Diagnostics.EntityFrameworkCore/SkyApm.Diagnostics.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.0;net5.0;net6.0 $(PackagePrefix).Diagnostics.EntityFrameworkCore From bd191ce28f9bcec693f52d71f3fd80e83ff641ae Mon Sep 17 00:00:00 2001 From: liuhaoyang Date: Sun, 2 Jan 2022 23:04:34 +0800 Subject: [PATCH 6/9] Fix tests project build --- test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj b/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj index 899d16f2..88ac16f2 100644 --- a/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj +++ b/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0;netcoreapp2.1 + netcoreapp2.0;netcoreapp2.1;net5.0;net6.0 false From 70453fff74a6a57b5b9c211f1cab011992f2fdbf Mon Sep 17 00:00:00 2001 From: liuhaoyang Date: Sun, 2 Jan 2022 23:12:34 +0800 Subject: [PATCH 7/9] Fix build --- .../SkyApm.Utilities.DependencyInjection.csproj | 8 +++++++- test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/SkyApm.Utilities.DependencyInjection/SkyApm.Utilities.DependencyInjection.csproj b/src/SkyApm.Utilities.DependencyInjection/SkyApm.Utilities.DependencyInjection.csproj index 39bf2a8e..f0e124d0 100644 --- a/src/SkyApm.Utilities.DependencyInjection/SkyApm.Utilities.DependencyInjection.csproj +++ b/src/SkyApm.Utilities.DependencyInjection/SkyApm.Utilities.DependencyInjection.csproj @@ -14,7 +14,13 @@ - + + + + + + + \ No newline at end of file diff --git a/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj b/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj index 88ac16f2..76025c6b 100644 --- a/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj +++ b/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0;netcoreapp2.1;net5.0;net6.0 + netcoreapp2.0;netcoreapp3.1;net5.0;net6.0 false From 3b7f5862d93ad0ed459805ed8f0ea9607dab09da Mon Sep 17 00:00:00 2001 From: liuhaoyang Date: Mon, 3 Jan 2022 01:24:29 +0800 Subject: [PATCH 8/9] Fix build error --- .../SkyApm.Benchmark/SkyApm.Benchmark.csproj | 2 +- .../App_Start/RouteConfig.cs | 19 -- .../App_Start/WebApiConfig.cs | 21 -- .../Controllers/ValuesController.cs | 30 -- sample/SkyApm.Sample.AspNet/Global.asax | 1 - sample/SkyApm.Sample.AspNet/Global.asax.cs | 23 -- .../Properties/AssemblyInfo.cs | 36 -- .../SkyApm.Sample.AspNet.csproj | 252 -------------- sample/SkyApm.Sample.AspNet/Web.config | 321 ------------------ sample/SkyApm.Sample.AspNet/favicon.ico | Bin 32038 -> 0 bytes sample/SkyApm.Sample.AspNet/packages.config | 42 --- sample/SkyApm.Sample.AspNet/skyapm.json | 29 -- .../SkyApm.Sample.Backend.csproj | 17 +- sample/SkyApm.Sample.Backend/Startup.cs | 6 - .../SkyApm.Sample.Frontend.csproj | 12 +- .../SkyApm.Sample.GrpcServer.csproj | 5 +- skyapm-dotnet.sln | 14 - src/SkyApm.Agent.AspNet/AsyncContext.cs | 51 --- .../Configuration/ConfigurationFactory.cs | 30 -- .../Extensions/ServiceCollectionExtensions.cs | 79 ----- .../HostingEnvironmentProvider.cs | 34 -- .../HttpRequestCarrierHeaderCollection.cs | 61 ---- src/SkyApm.Agent.AspNet/HttpTracingHandler.cs | 138 -------- src/SkyApm.Agent.AspNet/InstrumentModule.cs | 53 --- .../InstrumentModuleFactory.cs | 47 --- .../InstrumentRequestCallback.cs | 103 ------ .../ServiceProviderLocator.cs | 49 --- .../SkyApm.Agent.AspNet.csproj | 32 -- .../Tracing/EntrySegmentContextAccessor.cs | 26 -- .../Tracing/ExitSegmentContextAccessor.cs | 26 -- .../Tracing/HttpContextContextAccessor.cs | 52 --- .../Tracing/LocalSegmentContextAccessor.cs | 48 --- .../SkyApm.Agent.AspNetCore.csproj | 5 +- .../SkyApm.Agent.Hosting.csproj | 5 +- src/SkyApm.Core/SkyApm.Core.csproj | 2 +- .../SkyApm.Diagnostics.AspNetCore.csproj | 14 +- .../SkyApm.Diagnostics.CAP.csproj | 2 +- ...gnostics.EntityFrameworkCore.Npgsql.csproj | 2 +- ...cs.EntityFrameworkCore.Pomelo.MySql.csproj | 2 +- ...gnostics.EntityFrameworkCore.Sqlite.csproj | 2 +- ...Apm.Diagnostics.EntityFrameworkCore.csproj | 50 +-- .../SkyApm.Diagnostics.Grpc.Net.Client.csproj | 22 +- .../SkyApm.Diagnostics.Grpc.csproj | 3 +- .../SkyApm.Diagnostics.HttpClient.csproj | 2 +- .../SkyApm.Diagnostics.MongoDB.csproj | 2 +- .../SkyApm.Diagnostics.SmartSql.csproj | 2 +- .../SkyApm.Diagnostics.SqlClient.csproj | 2 +- .../SkyApm.DotNet.CLI.csproj | 15 +- .../SkyApm.Utilities.Configuration.csproj | 29 +- ...kyApm.Utilities.DependencyInjection.csproj | 2 +- .../SkyApm.Utilities.Logging.csproj | 13 +- .../SkyApm.Core.Tests.csproj | 2 +- 52 files changed, 111 insertions(+), 1726 deletions(-) delete mode 100644 sample/SkyApm.Sample.AspNet/App_Start/RouteConfig.cs delete mode 100644 sample/SkyApm.Sample.AspNet/App_Start/WebApiConfig.cs delete mode 100644 sample/SkyApm.Sample.AspNet/Controllers/ValuesController.cs delete mode 100644 sample/SkyApm.Sample.AspNet/Global.asax delete mode 100644 sample/SkyApm.Sample.AspNet/Global.asax.cs delete mode 100644 sample/SkyApm.Sample.AspNet/Properties/AssemblyInfo.cs delete mode 100644 sample/SkyApm.Sample.AspNet/SkyApm.Sample.AspNet.csproj delete mode 100644 sample/SkyApm.Sample.AspNet/Web.config delete mode 100644 sample/SkyApm.Sample.AspNet/favicon.ico delete mode 100644 sample/SkyApm.Sample.AspNet/packages.config delete mode 100644 sample/SkyApm.Sample.AspNet/skyapm.json delete mode 100644 src/SkyApm.Agent.AspNet/AsyncContext.cs delete mode 100644 src/SkyApm.Agent.AspNet/Configuration/ConfigurationFactory.cs delete mode 100644 src/SkyApm.Agent.AspNet/Extensions/ServiceCollectionExtensions.cs delete mode 100644 src/SkyApm.Agent.AspNet/HostingEnvironmentProvider.cs delete mode 100644 src/SkyApm.Agent.AspNet/HttpRequestCarrierHeaderCollection.cs delete mode 100644 src/SkyApm.Agent.AspNet/HttpTracingHandler.cs delete mode 100644 src/SkyApm.Agent.AspNet/InstrumentModule.cs delete mode 100644 src/SkyApm.Agent.AspNet/InstrumentModuleFactory.cs delete mode 100644 src/SkyApm.Agent.AspNet/InstrumentRequestCallback.cs delete mode 100644 src/SkyApm.Agent.AspNet/ServiceProviderLocator.cs delete mode 100644 src/SkyApm.Agent.AspNet/SkyApm.Agent.AspNet.csproj delete mode 100644 src/SkyApm.Agent.AspNet/Tracing/EntrySegmentContextAccessor.cs delete mode 100644 src/SkyApm.Agent.AspNet/Tracing/ExitSegmentContextAccessor.cs delete mode 100644 src/SkyApm.Agent.AspNet/Tracing/HttpContextContextAccessor.cs delete mode 100644 src/SkyApm.Agent.AspNet/Tracing/LocalSegmentContextAccessor.cs diff --git a/benchmark/SkyApm.Benchmark/SkyApm.Benchmark.csproj b/benchmark/SkyApm.Benchmark/SkyApm.Benchmark.csproj index 4830393c..0fdf6457 100644 --- a/benchmark/SkyApm.Benchmark/SkyApm.Benchmark.csproj +++ b/benchmark/SkyApm.Benchmark/SkyApm.Benchmark.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1;netcoreapp3.1;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 diff --git a/sample/SkyApm.Sample.AspNet/App_Start/RouteConfig.cs b/sample/SkyApm.Sample.AspNet/App_Start/RouteConfig.cs deleted file mode 100644 index 7faa9a03..00000000 --- a/sample/SkyApm.Sample.AspNet/App_Start/RouteConfig.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Web.Mvc; -using System.Web.Routing; - -namespace SkyApm.Sample.AspNet -{ - public class RouteConfig - { - public static void RegisterRoutes(RouteCollection routes) - { - routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); - - routes.MapRoute( - "Default", - "{controller}/{action}/{id}", - new {controller = "Home", action = "Index", id = UrlParameter.Optional} - ); - } - } -} \ No newline at end of file diff --git a/sample/SkyApm.Sample.AspNet/App_Start/WebApiConfig.cs b/sample/SkyApm.Sample.AspNet/App_Start/WebApiConfig.cs deleted file mode 100644 index 3995fc51..00000000 --- a/sample/SkyApm.Sample.AspNet/App_Start/WebApiConfig.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Web.Http; - -namespace SkyApm.Sample.AspNet -{ - public static class WebApiConfig - { - public static void Register(HttpConfiguration config) - { - // Web API configuration and services - - // Web API routes - config.MapHttpAttributeRoutes(); - - config.Routes.MapHttpRoute( - "DefaultApi", - "api/{controller}/{id}", - new {id = RouteParameter.Optional} - ); - } - } -} \ No newline at end of file diff --git a/sample/SkyApm.Sample.AspNet/Controllers/ValuesController.cs b/sample/SkyApm.Sample.AspNet/Controllers/ValuesController.cs deleted file mode 100644 index 4c01c25e..00000000 --- a/sample/SkyApm.Sample.AspNet/Controllers/ValuesController.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Net.Http; -using System.Threading.Tasks; -using System.Web.Http; -using SkyApm.Agent.AspNet; - -namespace SkyApm.Sample.AspNet.Controllers -{ - [RoutePrefix("api/values")] - public class ValuesController : ApiController - { - [HttpGet] - public async Task Get() - { - var httpClient = new HttpClient(new HttpTracingHandler()); - var values = await httpClient.GetStringAsync("http://localhost:5001/api/values"); - return Json(values); - } - - [HttpGet] - [Route("{id:int}")] - public async Task Get(int id) - { - var client = HttpClientFactory.Create(new HttpTracingHandler(null)); - Task.WhenAll(client.GetAsync("http://localhost:5002/api/delay/2000"), - client.GetAsync("http://localhost:5002/api/values"), - client.GetAsync("http://localhost:5002/api/delay/200")); - return await client.GetStringAsync("http://localhost:5002/api/delay/100"); - } - } -} \ No newline at end of file diff --git a/sample/SkyApm.Sample.AspNet/Global.asax b/sample/SkyApm.Sample.AspNet/Global.asax deleted file mode 100644 index 0a1a3c9c..00000000 --- a/sample/SkyApm.Sample.AspNet/Global.asax +++ /dev/null @@ -1 +0,0 @@ -<%@ Application Inherits="SkyApm.Sample.AspNet.Global" %> diff --git a/sample/SkyApm.Sample.AspNet/Global.asax.cs b/sample/SkyApm.Sample.AspNet/Global.asax.cs deleted file mode 100644 index 574fa5a6..00000000 --- a/sample/SkyApm.Sample.AspNet/Global.asax.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Web; -using System.Web.Mvc; -using System.Web.Routing; -using System.Web.Http; -using SkyApm.Agent.AspNet; - -namespace SkyApm.Sample.AspNet -{ - public class Global : HttpApplication - { - protected void Application_Start() - { - AreaRegistration.RegisterAllAreas(); - GlobalConfiguration.Configure(WebApiConfig.Register); - RouteConfig.RegisterRoutes(RouteTable.Routes); - - InstrumentModuleFactory.ConfigServices(services => - { - //register your components here - }); - } - } -} \ No newline at end of file diff --git a/sample/SkyApm.Sample.AspNet/Properties/AssemblyInfo.cs b/sample/SkyApm.Sample.AspNet/Properties/AssemblyInfo.cs deleted file mode 100644 index 97f9d9df..00000000 --- a/sample/SkyApm.Sample.AspNet/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SkyApm.Sample.AspNet")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SkyApm.Sample.AspNet")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("C3649845-E458-448D-B97D-C7E231E1D040")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/sample/SkyApm.Sample.AspNet/SkyApm.Sample.AspNet.csproj b/sample/SkyApm.Sample.AspNet/SkyApm.Sample.AspNet.csproj deleted file mode 100644 index d7f32869..00000000 --- a/sample/SkyApm.Sample.AspNet/SkyApm.Sample.AspNet.csproj +++ /dev/null @@ -1,252 +0,0 @@ - - - - - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - - Debug - AnyCPU - {C3649845-E458-448D-B97D-C7E231E1D040} - {349C5851-65DF-11DA-9384-00065B846F21};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - Properties - SkyApm.Sample.AspNet - SkyApm.Sample.AspNet - v4.6.1 - 512 - - - - - 4.0 - true - - - - - - - - - AnyCPU - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - ..\..\packages\Grpc.Core.2.37.0\lib\net45\Grpc.Core.dll - - - ..\..\packages\Grpc.Core.Api.2.37.0\lib\net45\Grpc.Core.Api.dll - - - ..\..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - - - ..\..\packages\Microsoft.Extensions.Configuration.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll - - - ..\..\packages\Microsoft.Extensions.Configuration.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll - - - ..\..\packages\Microsoft.Extensions.Configuration.Binder.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll - - - ..\..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll - - - ..\..\packages\Microsoft.Extensions.Configuration.FileExtensions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll - - - ..\..\packages\Microsoft.Extensions.Configuration.Json.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Json.dll - - - ..\..\packages\Microsoft.Extensions.DependencyInjection.3.1.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll - - - ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\..\packages\Microsoft.Extensions.FileProviders.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll - - - ..\..\packages\Microsoft.Extensions.FileProviders.Physical.3.1.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll - - - ..\..\packages\Microsoft.Extensions.FileSystemGlobbing.3.1.0\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll - - - ..\..\packages\Microsoft.Extensions.Logging.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.dll - - - ..\..\packages\Microsoft.Extensions.Logging.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll - - - ..\..\packages\Microsoft.Extensions.Options.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Options.dll - - - ..\..\packages\Microsoft.Extensions.Primitives.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll - - - ../..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - - - ..\..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll - - - ..\..\packages\System.ComponentModel.Annotations.4.7.0\lib\net461\System.ComponentModel.Annotations.dll - - - - - - ..\..\packages\System.Interactive.Async.4.0.0\lib\net461\System.Interactive.Async.dll - - - ..\..\packages\System.Linq.Async.4.0.0\lib\net461\System.Linq.Async.dll - - - ..\..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll - - - - ..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - ..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe.4.7.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - - - ..\..\packages\System.Text.Encodings.Web.4.7.0\lib\netstandard2.0\System.Text.Encodings.Web.dll - - - ..\..\packages\System.Text.Json.4.7.0\lib\net461\System.Text.Json.dll - - - ..\..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - - - ..\..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll - - - - ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll - - - ..\..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll - - - ..\..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - - - ..\..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - - - - - - ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - - - - - - - - - - - - - - - - Designer - - - - - - - - {3a454a8a-a1b7-4c6d-be08-52d956f95cc1} - SkyApm.Agent.AspNet - - - - - - - - - - - - - True - True - 0 - / - http://localhost:59909/ - False - False - - - False - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/sample/SkyApm.Sample.AspNet/Web.config b/sample/SkyApm.Sample.AspNet/Web.config deleted file mode 100644 index 18189156..00000000 --- a/sample/SkyApm.Sample.AspNet/Web.config +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sample/SkyApm.Sample.AspNet/favicon.ico b/sample/SkyApm.Sample.AspNet/favicon.ico deleted file mode 100644 index cebaec503588bc83ad8e141c6b70a327f6c7b4e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32038 zcmeHwd5~Rab!WR0YAQ8VjQL}je@TVZI5kyN{$&b`a3+C37$(7NCdM`xupB z{_eZ|-uuou-&wxzELVAXx8(g{-mSOh;q{Tc2mUZG@2`0E5%WGD_e*f^&;Q(c|EGC* zU-_?jdE2&`_qW}Vm$&{u^YU)PTmHmH0JrG>@fmzC`xR9M*mu#rLlB~a6ldP+`kgUIWK3;e6Y`pHm+4%88C1ZV#oW#>XXou;pF z@KIS^oCnOw>cXsy4iD=0=Vqp4Vq{3hhX!O6zdtoRpudxjM$%K0B z2)YsMF`_s}@@vL+lykA14KausdHGF>o z-|v%1s8ymJ?b6X6k#lFyNMl32TsnVN2D;NS(%&O5zw+{zW@cujyXpmr6+S58LqC)C z^>tYSy`$h0c{VvZthkUK@?@m9Qx>s?T+bs%j{GIR-*ft(B~kjgbR2s|_#)3nhn(-@ zH%13~-QO6+Z!AI%xW>m%9M|vnp8mBYiXW5qvK`L%m-PEnSVPJeaTy)#TO&`11HQio zIaxb(s@#0P`d=hjg87d;t>0f=U6r}n8LY#cEH2E+Jgy0ISUbwnGGvT@tE{Zl@Ap-| zD5=sXBvJ9AJO3DD%nzhz7Wr0lW{;yy5mvlj&(>^tX;aI5kNQt3iiEQ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ahg^4C5gCKaXb*K;n|da^q9sEptlsym!{13R{azD)E;$g zB6^sW4-fvkrJubs7Hpp+dw}@7C&t@1r~fg~4q0c<_Wt`p|354JY7=M|@VsUEhb`Iv zP2~7`WZ(ZCe_yNZSq!3`eWL99V;|I}^i%(}R}}INInaNT2+ur7qFc$^F zr2WUV36u%iz#!QnbM4Eor#EtKX$=}lFZ+;RdF2&({q@&n&z?P!pPw%U1qHHi-#+9H z_Q-()2lTn#jGN=7a&N~V8g%^+aP7&12ORpb9{}z22}$+;Ti^fR2<`lC5Z&4vj57k) zoX^Z+Zy)JPr_(Cu^>y_s>&?wA+QY}5K1;KI45B|(`XkWj=s$FU_8IUi9|%X^%brkg@Le{bn>|{BYKr z&Aw~#zmd^TYtVH^s8!{iduhH%JD)9pe=kA0q5tgP#4C_?-rtM{emU3cM!uWtH?!~i zd$F^xNh@s}_1*S6llCZ{ea`zq`i|ev;Khy5a3kN%rZd<3Y?^IvH+?+!wS0~N<)1#! z(oS9Hb0xBA4SIhgG~CE{bI}`g-_p!ACRp0}+?7-+rSw~wrybybc>~-h!AV@p)mV0{Y?fXU3wfxSF*p6$pHQAr1 WtkcI|i>(Wy4QJv1c>RCOf&T|-Vw}_f diff --git a/sample/SkyApm.Sample.AspNet/packages.config b/sample/SkyApm.Sample.AspNet/packages.config deleted file mode 100644 index 7d6b17c9..00000000 --- a/sample/SkyApm.Sample.AspNet/packages.config +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sample/SkyApm.Sample.AspNet/skyapm.json b/sample/SkyApm.Sample.AspNet/skyapm.json deleted file mode 100644 index d419a695..00000000 --- a/sample/SkyApm.Sample.AspNet/skyapm.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "SkyWalking": { - "ServiceName": "asp-net-sample", - "Namespace": "", - "HeaderVersions": [ - "sw6" - ], - "Sampling": { - "SamplePer3Secs": -1, - "Percentage": -1.0 - }, - "Logging": { - "Level": "Information", - "FilePath": "logs/skyapm-{Date}.log" - }, - "Transport": { - "Interval": 3000, - "ProtocolVersion": "v6", - "QueueSize": 30000, - "BatchSize": 3000, - "gRPC": { - "Servers": "localhost:11800", - "Timeout": 10000, - "ConnectTimeout": 10000, - "ReportTimeout": 600000 - } - } - } -} \ No newline at end of file diff --git a/sample/SkyApm.Sample.Backend/SkyApm.Sample.Backend.csproj b/sample/SkyApm.Sample.Backend/SkyApm.Sample.Backend.csproj index 5de42122..d3d914ce 100644 --- a/sample/SkyApm.Sample.Backend/SkyApm.Sample.Backend.csproj +++ b/sample/SkyApm.Sample.Backend/SkyApm.Sample.Backend.csproj @@ -1,25 +1,24 @@  - netcoreapp2.1;netcoreapp3.1 + netcoreapp3.1;net5.0;net6.0 + - - - 3.1.0 - - - + + + + - - + + diff --git a/sample/SkyApm.Sample.Backend/Startup.cs b/sample/SkyApm.Sample.Backend/Startup.cs index f1cac302..65a722f5 100644 --- a/sample/SkyApm.Sample.Backend/Startup.cs +++ b/sample/SkyApm.Sample.Backend/Startup.cs @@ -10,12 +10,6 @@ using SkyApm.Sample.GrpcServer; using SkyApm.Tracing; -#if NETCOREAPP2_1 - -using IHostEnvironment = Microsoft.Extensions.Hosting.IHostingEnvironment; - -#endif - namespace SkyApm.Sample.Backend { public class Startup diff --git a/sample/SkyApm.Sample.Frontend/SkyApm.Sample.Frontend.csproj b/sample/SkyApm.Sample.Frontend/SkyApm.Sample.Frontend.csproj index f8af9f6c..19bb0bae 100644 --- a/sample/SkyApm.Sample.Frontend/SkyApm.Sample.Frontend.csproj +++ b/sample/SkyApm.Sample.Frontend/SkyApm.Sample.Frontend.csproj @@ -1,20 +1,12 @@  - netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 SkyApm.Sample.Backend - - - - - - - - - + diff --git a/sample/grpc/SkyApm.Sample.GrpcServer/SkyApm.Sample.GrpcServer.csproj b/sample/grpc/SkyApm.Sample.GrpcServer/SkyApm.Sample.GrpcServer.csproj index 8b6976f4..21268ace 100644 --- a/sample/grpc/SkyApm.Sample.GrpcServer/SkyApm.Sample.GrpcServer.csproj +++ b/sample/grpc/SkyApm.Sample.GrpcServer/SkyApm.Sample.GrpcServer.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1;netcoreapp3.1;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 @@ -11,9 +11,6 @@ PreserveNewest - - - diff --git a/skyapm-dotnet.sln b/skyapm-dotnet.sln index 4f71d120..12b5dff1 100644 --- a/skyapm-dotnet.sln +++ b/skyapm-dotnet.sln @@ -58,10 +58,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkyApm.Diagnostics.EntityFr EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkyApm.Diagnostics.EntityFrameworkCore.Npgsql", "src\SkyApm.Diagnostics.EntityFrameworkCore.Npgsql\SkyApm.Diagnostics.EntityFrameworkCore.Npgsql.csproj", "{F8D96C30-369C-4FCB-B5B2-02EAA74199C9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkyApm.Agent.AspNet", "src\SkyApm.Agent.AspNet\SkyApm.Agent.AspNet.csproj", "{3A454A8A-A1B7-4C6D-BE08-52D956F95CC1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkyApm.Sample.AspNet", "sample\SkyApm.Sample.AspNet\SkyApm.Sample.AspNet.csproj", "{C3649845-E458-448D-B97D-C7E231E1D040}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkyApm.Transport.Grpc", "src\SkyApm.Transport.Grpc\SkyApm.Transport.Grpc.csproj", "{FF2FC3FB-D112-45C1-AF34-1FE37D55F682}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkyApm.Diagnostics.AspNetCore", "src\SkyApm.Diagnostics.AspNetCore\SkyApm.Diagnostics.AspNetCore.csproj", "{CFBB522D-495F-40F9-B68F-DA25E48D9F6A}" @@ -150,14 +146,6 @@ Global {F8D96C30-369C-4FCB-B5B2-02EAA74199C9}.Debug|Any CPU.Build.0 = Debug|Any CPU {F8D96C30-369C-4FCB-B5B2-02EAA74199C9}.Release|Any CPU.ActiveCfg = Release|Any CPU {F8D96C30-369C-4FCB-B5B2-02EAA74199C9}.Release|Any CPU.Build.0 = Release|Any CPU - {3A454A8A-A1B7-4C6D-BE08-52D956F95CC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3A454A8A-A1B7-4C6D-BE08-52D956F95CC1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3A454A8A-A1B7-4C6D-BE08-52D956F95CC1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3A454A8A-A1B7-4C6D-BE08-52D956F95CC1}.Release|Any CPU.Build.0 = Release|Any CPU - {C3649845-E458-448D-B97D-C7E231E1D040}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C3649845-E458-448D-B97D-C7E231E1D040}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C3649845-E458-448D-B97D-C7E231E1D040}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C3649845-E458-448D-B97D-C7E231E1D040}.Release|Any CPU.Build.0 = Release|Any CPU {FF2FC3FB-D112-45C1-AF34-1FE37D55F682}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FF2FC3FB-D112-45C1-AF34-1FE37D55F682}.Debug|Any CPU.Build.0 = Debug|Any CPU {FF2FC3FB-D112-45C1-AF34-1FE37D55F682}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -264,8 +252,6 @@ Global {44DFFDF7-5935-475A-825F-2C0298464117} = {B5E677CF-2920-4B0A-A056-E73F6B2CF2BC} {F5C529C9-23C4-46B7-84FF-E86C6D17EB3E} = {A4E67E09-3156-4D30-B451-F24F706E96C4} {F8D96C30-369C-4FCB-B5B2-02EAA74199C9} = {A4E67E09-3156-4D30-B451-F24F706E96C4} - {3A454A8A-A1B7-4C6D-BE08-52D956F95CC1} = {EF6194B2-9ACB-49B9-8049-DD6AFAEB0399} - {C3649845-E458-448D-B97D-C7E231E1D040} = {844CEACD-4C85-4B15-9E2B-892B01FDA4BB} {FF2FC3FB-D112-45C1-AF34-1FE37D55F682} = {CBFF7EE0-69D7-4D6A-9BBD-8E567FF4D810} {CFBB522D-495F-40F9-B68F-DA25E48D9F6A} = {B5E677CF-2920-4B0A-A056-E73F6B2CF2BC} {0B87C4B8-3F4F-456A-B588-28D8E9E3395A} = {4BD917BC-D579-4C75-9939-41BF012A4EE2} diff --git a/src/SkyApm.Agent.AspNet/AsyncContext.cs b/src/SkyApm.Agent.AspNet/AsyncContext.cs deleted file mode 100644 index d456a2f9..00000000 --- a/src/SkyApm.Agent.AspNet/AsyncContext.cs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace SkyApm.Agent.AspNet -{ - internal static class AsyncContext - { - public static void Run(Func task) - { - using (new ContextScope()) - { - Task.Run(async () => await task()).GetAwaiter().GetResult(); - } - } - - private class ContextScope : IDisposable - { - private readonly SynchronizationContext _current; - - public ContextScope() - { - _current = SynchronizationContext.Current; - SynchronizationContext.SetSynchronizationContext(null); - } - - public void Dispose() - { - SynchronizationContext.SetSynchronizationContext(_current); - } - } - } -} diff --git a/src/SkyApm.Agent.AspNet/Configuration/ConfigurationFactory.cs b/src/SkyApm.Agent.AspNet/Configuration/ConfigurationFactory.cs deleted file mode 100644 index 71b2dde4..00000000 --- a/src/SkyApm.Agent.AspNet/Configuration/ConfigurationFactory.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using SkyApm.Utilities.Configuration; -using System.Collections.Generic; - -namespace SkyApm.Agent.AspNet.Configuration -{ - public class ConfigurationFactory : SkyApm.Utilities.Configuration.ConfigurationFactory - { - public ConfigurationFactory(IEnvironmentProvider environmentProvider, IEnumerable additionalConfigurations) : base(environmentProvider, additionalConfigurations, null) - { - } - } -} diff --git a/src/SkyApm.Agent.AspNet/Extensions/ServiceCollectionExtensions.cs b/src/SkyApm.Agent.AspNet/Extensions/ServiceCollectionExtensions.cs deleted file mode 100644 index 3651c23d..00000000 --- a/src/SkyApm.Agent.AspNet/Extensions/ServiceCollectionExtensions.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using Microsoft.Extensions.DependencyInjection; -using SkyApm.Config; -using SkyApm.Diagnostics; -using SkyApm.Logging; -using SkyApm.Sampling; -using SkyApm.Service; -using SkyApm.Tracing; -using SkyApm.Transport; -using SkyApm.Transport.Grpc; -using SkyApm.Utilities.Configuration; -using SkyApm.Utilities.Logging; - -namespace SkyApm.Agent.AspNet.Extensions -{ - internal static class ServiceCollectionExtensions - { - public static IServiceCollection AddSkyAPMCore(this IServiceCollection services) - { - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(RuntimeEnvironment.Instance); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - - services.AddSingleton(); - services.AddSingleton(p => p.GetService()); - services.AddSingleton(p => p.GetService()); - services.AddSingleton(); - services.AddSingleton(); - - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - - services.AddSingleton(); - return services; - } - } -} \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/HostingEnvironmentProvider.cs b/src/SkyApm.Agent.AspNet/HostingEnvironmentProvider.cs deleted file mode 100644 index 484583f3..00000000 --- a/src/SkyApm.Agent.AspNet/HostingEnvironmentProvider.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using System; - -namespace SkyApm.Agent.AspNet -{ - internal class HostingEnvironmentProvider : IEnvironmentProvider - { - private const string ENVIRONMENT_KEY = "ASPNET__ENVIRONMENT"; - - public string EnvironmentName { get; } - - public HostingEnvironmentProvider() - { - EnvironmentName = Environment.GetEnvironmentVariable(ENVIRONMENT_KEY) ?? "Production"; - } - } -} \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/HttpRequestCarrierHeaderCollection.cs b/src/SkyApm.Agent.AspNet/HttpRequestCarrierHeaderCollection.cs deleted file mode 100644 index ec297c43..00000000 --- a/src/SkyApm.Agent.AspNet/HttpRequestCarrierHeaderCollection.cs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using System.Collections; -using System.Collections.Generic; -using System.Web; -using SkyApm.Tracing; - -namespace SkyApm.Agent.AspNet -{ - internal class HttpRequestCarrierHeaderCollection : ICarrierHeaderDictionary - { - private readonly Dictionary _headers; - - public HttpRequestCarrierHeaderCollection(HttpRequest httpRequest) - { - _headers = new Dictionary(); - foreach (var key in httpRequest.Headers.AllKeys) - { - _headers[key] = httpRequest.Headers[key]; - } - } - - public IEnumerator> GetEnumerator() - { - return _headers.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return _headers.GetEnumerator(); - } - - public void Add(string key, string value) - { - throw new System.NotImplementedException(); - } - - public string Get(string key) - { - if (_headers.TryGetValue(key, out var value)) - return value; - return null; - } - } -} \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/HttpTracingHandler.cs b/src/SkyApm.Agent.AspNet/HttpTracingHandler.cs deleted file mode 100644 index eb06b322..00000000 --- a/src/SkyApm.Agent.AspNet/HttpTracingHandler.cs +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading; -using System.Threading.Tasks; -using CommonServiceLocator; -using SkyApm.Tracing; -using SkyApm.Tracing.Segments; - -namespace SkyApm.Agent.AspNet -{ - public class HttpTracingHandler : DelegatingHandler - { - /// - /// If you are passing this delegating handler to method, please pass a `null` in constructor as innerHandler. - /// if you are passing it in constructor, just use it's non-parameter constructor. - /// as follow: - /// var httpClient = HttpClientFactory.Create(new HttpTracingHandler(null)) - /// or - /// var httpClient = new HttpClient(new HttpTracingHandler()) - /// - public HttpTracingHandler() - : this(new HttpClientHandler()) - { - } - - /// - /// If you are passing this delegating handler to method, please pass a `null` in constructor as innerHandler. - /// if you are passing it in constructor, just use it's non-parameter constructor. - /// as follow: - /// var httpClient = HttpClientFactory.Create(new HttpTracingHandler(null)) - /// or - /// var httpClient = new HttpClient(new HttpTracingHandler()) - /// - public HttpTracingHandler(HttpMessageHandler innerHandler) - { - if (innerHandler != null) - { - InnerHandler = innerHandler; - } - } - - protected override async Task SendAsync(HttpRequestMessage request, - CancellationToken cancellationToken) - { - var tracingContext = ServiceLocator.Current.GetInstance(); - var operationName = request.RequestUri.ToString(); - var networkAddress = $"{request.RequestUri.Host}:{request.RequestUri.Port}"; - var context = tracingContext.CreateExitSegmentContext(operationName, networkAddress, - new CarrierHeaderCollection(request.Headers)); - try - { - HttpResponseMessage response; - - context.Span.SpanLayer = SpanLayer.HTTP; - context.Span.Component = Common.Components.HTTPCLIENT; - context.Span.AddTag(Common.Tags.URL, request.RequestUri.ToString()); - context.Span.AddTag(Common.Tags.PATH, request.RequestUri.PathAndQuery); - context.Span.AddTag(Common.Tags.HTTP_METHOD, request.Method.ToString()); - - // With ConfigureAwait on next await call, current HttpContext will not be available for the rest of the method. - // Because HttpContext is needed when we are using tracing context accessors, it must be stored in local variable. - var currentHttpContext = System.Web.HttpContext.Current; - - // Prevents deadlock for synchronous calls to HttpClient methods. - // More here: C#: Why you should use ConfigureAwait(false) in your library code - // https://medium.com/bynder-tech/c-why-you-should-use-configureawait-false-in-your-library-code-d7837dce3d7f - response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false); - - // Restoring HttpContext. - System.Web.HttpContext.Current = currentHttpContext; - - var statusCode = (int)response.StatusCode; - if (statusCode >= 400) - { - context.Span.ErrorOccurred(); - } - - context.Span.AddTag(Common.Tags.STATUS_CODE, statusCode); - return response; - } - catch (Exception exception) - { - context.Span.ErrorOccurred(exception); - throw; - } - finally - { - tracingContext.Release(context); - } - } - - private class CarrierHeaderCollection : ICarrierHeaderCollection - { - private readonly HttpRequestHeaders _headers; - - public CarrierHeaderCollection(HttpRequestHeaders headers) - { - _headers = headers; - } - - public void Add(string key, string value) - { - _headers.Add(key, value); - } - - public IEnumerator> GetEnumerator() - { - throw new NotImplementedException(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } - } -} \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/InstrumentModule.cs b/src/SkyApm.Agent.AspNet/InstrumentModule.cs deleted file mode 100644 index ff7670f8..00000000 --- a/src/SkyApm.Agent.AspNet/InstrumentModule.cs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using CommonServiceLocator; -using Microsoft.Extensions.DependencyInjection; -using System.Web; -using SkyApm.Agent.AspNet.Extensions; - -namespace SkyApm.Agent.AspNet -{ - public class InstrumentModule : IHttpModule - { - public InstrumentModule() - { - var services = new ServiceCollection(); - services.AddSkyAPMCore(); - InstrumentModuleFactory.ServicesBuilder?.Invoke(services); - var serviceProvider = services.BuildServiceProvider(); - var serviceLocatorProvider = new ServiceProviderLocator(serviceProvider); - ServiceLocator.SetLocatorProvider(() => serviceLocatorProvider); - } - - public void Init(HttpApplication application) - { - var startup = ServiceLocator.Current.GetInstance(); - AsyncContext.Run(() => startup.StartAsync()); - var requestCallback = ServiceLocator.Current.GetInstance(); - application.BeginRequest += requestCallback.ApplicationOnBeginRequest; - application.EndRequest += requestCallback.ApplicationOnEndRequest; - } - - public void Dispose() - { - var startup = ServiceLocator.Current.GetInstance(); - AsyncContext.Run(() => startup.StopAsync()); - } - } -} \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/InstrumentModuleFactory.cs b/src/SkyApm.Agent.AspNet/InstrumentModuleFactory.cs deleted file mode 100644 index 3b9d2b2e..00000000 --- a/src/SkyApm.Agent.AspNet/InstrumentModuleFactory.cs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using Microsoft.Web.Infrastructure.DynamicModuleHelper; -using System.Web; -using SkyApm.Agent.AspNet; -using System; -using Microsoft.Extensions.DependencyInjection; - -[assembly:PreApplicationStartMethod(typeof(InstrumentModuleFactory), nameof(InstrumentModuleFactory.Create))] - -namespace SkyApm.Agent.AspNet -{ - public class InstrumentModuleFactory - { - internal static Action ServicesBuilder { get; private set; } - - public static void Create() - { - DynamicModuleUtility.RegisterModule(typeof(InstrumentModule)); - } - - /// - /// Entrance to register or override services - /// - /// - public static void ConfigServices(Action servicesBuilder) - { - ServicesBuilder = servicesBuilder; - } - } -} \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/InstrumentRequestCallback.cs b/src/SkyApm.Agent.AspNet/InstrumentRequestCallback.cs deleted file mode 100644 index 0bf3d911..00000000 --- a/src/SkyApm.Agent.AspNet/InstrumentRequestCallback.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using System; -using System.Web; -using SkyApm.Common; -using SkyApm.Config; -using SkyApm.Tracing; -using SkyApm.Tracing.Segments; -using SpanLayer = SkyApm.Tracing.Segments.SpanLayer; - -namespace SkyApm.Agent.AspNet -{ - internal class InstrumentRequestCallback - { - private readonly InstrumentConfig _config; - private readonly ITracingContext _tracingContext; - private readonly IEntrySegmentContextAccessor _contextAccessor; - private readonly TracingConfig _tracingConfig; - - public InstrumentRequestCallback(IConfigAccessor configAccessor, ITracingContext tracingContext, - IEntrySegmentContextAccessor contextAccessor) - { - _config = configAccessor.Get(); - _tracingConfig = configAccessor.Get(); - _tracingContext = tracingContext; - _contextAccessor = contextAccessor; - } - - public void ApplicationOnBeginRequest(object sender, EventArgs e) - { - var httpApplication = sender as HttpApplication; - var httpContext = httpApplication.Context; - - if (httpContext.Request.HttpMethod == "OPTIONS") - { - //asp.net Exclude OPTIONS request - return; - } - var context = _tracingContext.CreateEntrySegmentContext(httpContext.Request.Path, - new HttpRequestCarrierHeaderCollection(httpContext.Request)); - context.Span.SpanLayer = SpanLayer.HTTP; - context.Span.Peer = new StringOrIntValue(httpContext.Request.UserHostAddress); - context.Span.Component = Common.Components.ASPNET; - context.Span.AddTag(Tags.URL, httpContext.Request.Url.OriginalString); - context.Span.AddTag(Tags.PATH, httpContext.Request.Path); - context.Span.AddTag(Tags.HTTP_METHOD, httpContext.Request.HttpMethod); - context.Span.AddLog(LogEvent.Event("AspNet BeginRequest"), - LogEvent.Message( - $"Request starting {httpContext.Request.Url.Scheme} {httpContext.Request.HttpMethod} {httpContext.Request.Url.OriginalString}")); - } - - public void ApplicationOnEndRequest(object sender, EventArgs e) - { - var context = _contextAccessor.Context; - if (context == null) - { - return; - } - - var httpApplication = sender as HttpApplication; - var httpContext = httpApplication.Context; - if (httpContext.Request.HttpMethod == "OPTIONS") - { - //asp.net Exclude OPTIONS request - return; - } - - var statusCode = httpContext.Response.StatusCode; - if (statusCode >= 400) - { - context.Span.ErrorOccurred(); - } - - var exception = httpContext.Error; - if (exception != null) - { - context.Span.ErrorOccurred(exception, _tracingConfig); - } - - context.Span.AddLog(LogEvent.Event("AspNet EndRequest"), - LogEvent.Message( - $"Request finished {httpContext.Response.StatusCode} {httpContext.Response.ContentType}")); - - _tracingContext.Release(context); - } - } -} \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/ServiceProviderLocator.cs b/src/SkyApm.Agent.AspNet/ServiceProviderLocator.cs deleted file mode 100644 index 827f86aa..00000000 --- a/src/SkyApm.Agent.AspNet/ServiceProviderLocator.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using CommonServiceLocator; -using System; -using System.Collections.Generic; -using Microsoft.Extensions.DependencyInjection; - -namespace SkyApm.Agent.AspNet -{ - internal class ServiceProviderLocator : IServiceLocator - { - private readonly IServiceProvider _serviceProvider; - - public ServiceProviderLocator(IServiceProvider serviceProvider) - { - _serviceProvider = serviceProvider; - } - - public object GetService(Type serviceType) => _serviceProvider.GetService(serviceType); - - public object GetInstance(Type serviceType) => _serviceProvider.GetService(serviceType); - - public object GetInstance(Type serviceType, string key) => GetInstance(serviceType); - - public IEnumerable GetAllInstances(Type serviceType) => _serviceProvider.GetServices(serviceType); - - public TService GetInstance() => (TService) GetInstance(typeof(TService)); - - public TService GetInstance(string key) => (TService) GetInstance(typeof(TService)); - - public IEnumerable GetAllInstances() => _serviceProvider.GetServices(); - } -} \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/SkyApm.Agent.AspNet.csproj b/src/SkyApm.Agent.AspNet/SkyApm.Agent.AspNet.csproj deleted file mode 100644 index 4041718a..00000000 --- a/src/SkyApm.Agent.AspNet/SkyApm.Agent.AspNet.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - net461;net462;net47;net471 - - - $(PackagePrefix).Agent.AspNet - $(PackagePrefix).Agent.AspNet - $(PackagePrefix).Agent.AspNet - SkyWalking;APM;Tracing - $(PackagePrefix) ASP.NET Agent. - SkyApm.Agent.AspNet - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/Tracing/EntrySegmentContextAccessor.cs b/src/SkyApm.Agent.AspNet/Tracing/EntrySegmentContextAccessor.cs deleted file mode 100644 index 6b4a7594..00000000 --- a/src/SkyApm.Agent.AspNet/Tracing/EntrySegmentContextAccessor.cs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using SkyApm.Tracing; - -namespace SkyApm.AspNet.Tracing -{ - public class EntrySegmentContextAccessor : HttpContextContextAccessor, IEntrySegmentContextAccessor - { - } -} \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/Tracing/ExitSegmentContextAccessor.cs b/src/SkyApm.Agent.AspNet/Tracing/ExitSegmentContextAccessor.cs deleted file mode 100644 index 821657fb..00000000 --- a/src/SkyApm.Agent.AspNet/Tracing/ExitSegmentContextAccessor.cs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using SkyApm.Tracing; - -namespace SkyApm.AspNet.Tracing -{ - public class ExitSegmentContextAccessor : HttpContextContextAccessor, IExitSegmentContextAccessor - { - } -} \ No newline at end of file diff --git a/src/SkyApm.Agent.AspNet/Tracing/HttpContextContextAccessor.cs b/src/SkyApm.Agent.AspNet/Tracing/HttpContextContextAccessor.cs deleted file mode 100644 index 07cb3705..00000000 --- a/src/SkyApm.Agent.AspNet/Tracing/HttpContextContextAccessor.cs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using SkyApm.Tracing.Segments; -using System.Web; - -namespace SkyApm.AspNet.Tracing -{ - /// - /// Sorry for the idiotic name. It's suppose to be "Accessor of the provided via ". - /// - public abstract class HttpContextContextAccessor where T : class - { - public virtual SegmentContext Context - { - get => GetValueOrNull(); - set => SetValue(value); - } - - private SegmentContext GetValueOrNull() - { - if (HttpContext.Current != null && HttpContext.Current.Items.Contains(typeof(T))) - { - return HttpContext.Current.Items[typeof(T)] as SegmentContext; - } - return null; - } - - private void SetValue(SegmentContext value) - { - if (HttpContext.Current != null) - { - HttpContext.Current.Items[typeof(T)] = value; - } - } - } -} diff --git a/src/SkyApm.Agent.AspNet/Tracing/LocalSegmentContextAccessor.cs b/src/SkyApm.Agent.AspNet/Tracing/LocalSegmentContextAccessor.cs deleted file mode 100644 index fcc3f72d..00000000 --- a/src/SkyApm.Agent.AspNet/Tracing/LocalSegmentContextAccessor.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the SkyAPM under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The SkyAPM licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -using SkyApm.Tracing; -using SkyApm.Tracing.Segments; -using System.Runtime.CompilerServices; - -namespace SkyApm.AspNet.Tracing -{ - public class LocalSegmentContextAccessor : HttpContextContextAccessor, ILocalSegmentContextAccessor - { - private readonly ConditionalWeakTable _parent = new ConditionalWeakTable(); - - public override SegmentContext Context - { - get => base.Context; - set - { - var current = base.Context; - if (value == null) - { - if (_parent.TryGetValue(current, out var parent)) - base.Context = parent; - } - else - { - _parent.Add(value, current); - base.Context = value; - } - } - } - } -} diff --git a/src/SkyApm.Agent.AspNetCore/SkyApm.Agent.AspNetCore.csproj b/src/SkyApm.Agent.AspNetCore/SkyApm.Agent.AspNetCore.csproj index 494b0785..d2bf417e 100644 --- a/src/SkyApm.Agent.AspNetCore/SkyApm.Agent.AspNetCore.csproj +++ b/src/SkyApm.Agent.AspNetCore/SkyApm.Agent.AspNetCore.csproj @@ -9,11 +9,8 @@ SkyApm.Agent.AspNetCore - netstandard2.0;netcoreapp3.1;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 - - - diff --git a/src/SkyApm.Agent.Hosting/SkyApm.Agent.Hosting.csproj b/src/SkyApm.Agent.Hosting/SkyApm.Agent.Hosting.csproj index e1161c22..4c9fbe5f 100644 --- a/src/SkyApm.Agent.Hosting/SkyApm.Agent.Hosting.csproj +++ b/src/SkyApm.Agent.Hosting/SkyApm.Agent.Hosting.csproj @@ -9,11 +9,8 @@ SkyApm.Agent.Hosting - netstandard2.0;netcoreapp3.1;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 - - - diff --git a/src/SkyApm.Core/SkyApm.Core.csproj b/src/SkyApm.Core/SkyApm.Core.csproj index 838ed598..ed627d3d 100644 --- a/src/SkyApm.Core/SkyApm.Core.csproj +++ b/src/SkyApm.Core/SkyApm.Core.csproj @@ -9,7 +9,7 @@ SkyApm - netstandard2.0;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0 + netstandard2.0 $(DefineConstants);SPAN diff --git a/src/SkyApm.Diagnostics.AspNetCore/SkyApm.Diagnostics.AspNetCore.csproj b/src/SkyApm.Diagnostics.AspNetCore/SkyApm.Diagnostics.AspNetCore.csproj index 38a0c276..ae1db9b6 100644 --- a/src/SkyApm.Diagnostics.AspNetCore/SkyApm.Diagnostics.AspNetCore.csproj +++ b/src/SkyApm.Diagnostics.AspNetCore/SkyApm.Diagnostics.AspNetCore.csproj @@ -5,7 +5,7 @@ $(PackagePrefix).Diagnostics.AspNetCore notifies Web Http requests. $(PackagePrefix).Diagnostics.AspNetCore - netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Diagnostics.AspNetCore $(PackagePrefix).Diagnostics.AspNetCore SkyWalking;APM;Diagnostics;AspNetCore @@ -18,17 +18,7 @@ - - - - - - - - - - - + diff --git a/src/SkyApm.Diagnostics.CAP/SkyApm.Diagnostics.CAP.csproj b/src/SkyApm.Diagnostics.CAP/SkyApm.Diagnostics.CAP.csproj index 3a244d3a..30c10f36 100644 --- a/src/SkyApm.Diagnostics.CAP/SkyApm.Diagnostics.CAP.csproj +++ b/src/SkyApm.Diagnostics.CAP/SkyApm.Diagnostics.CAP.csproj @@ -3,7 +3,7 @@ - netstandard2.0 + netcoreapp3.1;net5.0;net6.0 diff --git a/src/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql.csproj b/src/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql.csproj index 466c0dd7..af6da8b7 100644 --- a/src/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql.csproj +++ b/src/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql/SkyApm.Diagnostics.EntityFrameworkCore.Npgsql.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Diagnostics.EntityFrameworkCore.Npgsql diff --git a/src/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql.csproj b/src/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql.csproj index ccd7726c..3ae02bea 100644 --- a/src/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql.csproj +++ b/src/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql/SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Diagnostics.EntityFrameworkCore.Pomelo.MySql diff --git a/src/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite.csproj b/src/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite.csproj index 61a0112c..127aefbb 100644 --- a/src/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite.csproj +++ b/src/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite/SkyApm.Diagnostics.EntityFrameworkCore.Sqlite.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Diagnostics.EntityFrameworkCore.Sqlite diff --git a/src/SkyApm.Diagnostics.EntityFrameworkCore/SkyApm.Diagnostics.EntityFrameworkCore.csproj b/src/SkyApm.Diagnostics.EntityFrameworkCore/SkyApm.Diagnostics.EntityFrameworkCore.csproj index 4eaffa9c..a710f04d 100644 --- a/src/SkyApm.Diagnostics.EntityFrameworkCore/SkyApm.Diagnostics.EntityFrameworkCore.csproj +++ b/src/SkyApm.Diagnostics.EntityFrameworkCore/SkyApm.Diagnostics.EntityFrameworkCore.csproj @@ -1,23 +1,31 @@  - - - netstandard2.0;net5.0;net6.0 - - - $(PackagePrefix).Diagnostics.EntityFrameworkCore - $(PackagePrefix).Diagnostics.EntityFrameworkCore - $(PackagePrefix).Diagnostics.EntityFrameworkCore - $(PackagePrefix);APM;EntityFrameworkCore;EF - SkyApm.Diagnostics.EntityFrameworkCore notifies of EF requests. - SkyApm.Diagnostics.EntityFrameworkCore - - - - - - - - - - + + + netcoreapp3.1;net5.0;net6.0 + + + $(PackagePrefix).Diagnostics.EntityFrameworkCore + $(PackagePrefix).Diagnostics.EntityFrameworkCore + $(PackagePrefix).Diagnostics.EntityFrameworkCore + $(PackagePrefix);APM;EntityFrameworkCore;EF + SkyApm.Diagnostics.EntityFrameworkCore notifies of EF requests. + SkyApm.Diagnostics.EntityFrameworkCore + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SkyApm.Diagnostics.Grpc.Net.Client/SkyApm.Diagnostics.Grpc.Net.Client.csproj b/src/SkyApm.Diagnostics.Grpc.Net.Client/SkyApm.Diagnostics.Grpc.Net.Client.csproj index 7ac4a4e1..9d1d5b6c 100644 --- a/src/SkyApm.Diagnostics.Grpc.Net.Client/SkyApm.Diagnostics.Grpc.Net.Client.csproj +++ b/src/SkyApm.Diagnostics.Grpc.Net.Client/SkyApm.Diagnostics.Grpc.Net.Client.csproj @@ -1,16 +1,16 @@  - - netstandard2.0 - + + netcoreapp3.1;net5.0;net6.0 + - - - + + + - - - - - + + + + + \ No newline at end of file diff --git a/src/SkyApm.Diagnostics.Grpc/SkyApm.Diagnostics.Grpc.csproj b/src/SkyApm.Diagnostics.Grpc/SkyApm.Diagnostics.Grpc.csproj index 565feda9..447dae22 100644 --- a/src/SkyApm.Diagnostics.Grpc/SkyApm.Diagnostics.Grpc.csproj +++ b/src/SkyApm.Diagnostics.Grpc/SkyApm.Diagnostics.Grpc.csproj @@ -1,8 +1,7 @@  - netstandard2.0 - + netcoreapp3.1;net5.0;net6.0 diff --git a/src/SkyApm.Diagnostics.HttpClient/SkyApm.Diagnostics.HttpClient.csproj b/src/SkyApm.Diagnostics.HttpClient/SkyApm.Diagnostics.HttpClient.csproj index c36905b1..0fce5b03 100644 --- a/src/SkyApm.Diagnostics.HttpClient/SkyApm.Diagnostics.HttpClient.csproj +++ b/src/SkyApm.Diagnostics.HttpClient/SkyApm.Diagnostics.HttpClient.csproj @@ -5,7 +5,7 @@ $(PackagePrefix).Diagnostics.HttpClient notifies outgoing Http requests. $(PackagePrefix).Diagnostics.HttpClient - netstandard2.0 + netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Diagnostics.HttpClient $(PackagePrefix).Diagnostics.HttpClient SkyWalking;APM;Diagnostics;HttpClient diff --git a/src/SkyApm.Diagnostics.MongoDB/SkyApm.Diagnostics.MongoDB.csproj b/src/SkyApm.Diagnostics.MongoDB/SkyApm.Diagnostics.MongoDB.csproj index 69fab998..3cbf819f 100644 --- a/src/SkyApm.Diagnostics.MongoDB/SkyApm.Diagnostics.MongoDB.csproj +++ b/src/SkyApm.Diagnostics.MongoDB/SkyApm.Diagnostics.MongoDB.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp3.1;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 diff --git a/src/SkyApm.Diagnostics.SmartSql/SkyApm.Diagnostics.SmartSql.csproj b/src/SkyApm.Diagnostics.SmartSql/SkyApm.Diagnostics.SmartSql.csproj index a92db888..23bd1531 100644 --- a/src/SkyApm.Diagnostics.SmartSql/SkyApm.Diagnostics.SmartSql.csproj +++ b/src/SkyApm.Diagnostics.SmartSql/SkyApm.Diagnostics.SmartSql.csproj @@ -2,7 +2,7 @@ - netstandard2.0 + netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Diagnostics.SmartSql $(PackagePrefix).Diagnostics.SmartSql $(PackagePrefix).Diagnostics.SmartSql diff --git a/src/SkyApm.Diagnostics.SqlClient/SkyApm.Diagnostics.SqlClient.csproj b/src/SkyApm.Diagnostics.SqlClient/SkyApm.Diagnostics.SqlClient.csproj index be294e5b..3db26757 100644 --- a/src/SkyApm.Diagnostics.SqlClient/SkyApm.Diagnostics.SqlClient.csproj +++ b/src/SkyApm.Diagnostics.SqlClient/SkyApm.Diagnostics.SqlClient.csproj @@ -3,7 +3,7 @@ $(PackagePrefix).Diagnostics.SqlClient notifies outgoing SqlClient requests. $(PackagePrefix).Diagnostics.SqlClient - netstandard2.0 + netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Diagnostics.SqlClient $(PackagePrefix).Diagnostics.SqlClient SkyWalking;APM;Diagnostics;SqlClient diff --git a/src/SkyApm.DotNet.CLI/SkyApm.DotNet.CLI.csproj b/src/SkyApm.DotNet.CLI/SkyApm.DotNet.CLI.csproj index ec2d27d5..48e4ae2c 100644 --- a/src/SkyApm.DotNet.CLI/SkyApm.DotNet.CLI.csproj +++ b/src/SkyApm.DotNet.CLI/SkyApm.DotNet.CLI.csproj @@ -14,13 +14,24 @@ true true dotnet-skyapm - netcoreapp3.1 + netcoreapp3.1;net5.0;net6.0 - + + + + + + + + + + + + diff --git a/src/SkyApm.Utilities.Configuration/SkyApm.Utilities.Configuration.csproj b/src/SkyApm.Utilities.Configuration/SkyApm.Utilities.Configuration.csproj index 95c0cf5c..4609d997 100644 --- a/src/SkyApm.Utilities.Configuration/SkyApm.Utilities.Configuration.csproj +++ b/src/SkyApm.Utilities.Configuration/SkyApm.Utilities.Configuration.csproj @@ -1,10 +1,10 @@  - + $(Product) configuration extensions. $(PackagePrefix).Utilities.Configuration - netstandard2.0 + netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Utilities.Configuration $(PackagePrefix).Utilities.Configuration SkyWalking;APM;Diagnostics @@ -13,14 +13,25 @@ SkyApm.Utilities.Configuration - - - - - + + + + + + + + + + + + + + + + + - - + diff --git a/src/SkyApm.Utilities.DependencyInjection/SkyApm.Utilities.DependencyInjection.csproj b/src/SkyApm.Utilities.DependencyInjection/SkyApm.Utilities.DependencyInjection.csproj index f0e124d0..d05aef52 100644 --- a/src/SkyApm.Utilities.DependencyInjection/SkyApm.Utilities.DependencyInjection.csproj +++ b/src/SkyApm.Utilities.DependencyInjection/SkyApm.Utilities.DependencyInjection.csproj @@ -3,7 +3,7 @@ Microsoft.Utilities.DependencyInjection (IServiceCollection) support for $(Product). $(PackagePrefix).Utilities.DependencyInjection - netstandard2.0 + netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Utilities.DependencyInjection $(PackagePrefix).Utilities.DependencyInjection SkyWalking;APM;Diagnostics diff --git a/src/SkyApm.Utilities.Logging/SkyApm.Utilities.Logging.csproj b/src/SkyApm.Utilities.Logging/SkyApm.Utilities.Logging.csproj index 287378a8..eddb8c2b 100644 --- a/src/SkyApm.Utilities.Logging/SkyApm.Utilities.Logging.csproj +++ b/src/SkyApm.Utilities.Logging/SkyApm.Utilities.Logging.csproj @@ -4,7 +4,7 @@ Microsoft.Utilities.Logging support for $(Product). $(PackagePrefix).Utilities.Logging - netstandard2.0 + netcoreapp3.1;net5.0;net6.0 $(PackagePrefix).Utilities.Logging $(PackagePrefix).Utilities.Logging SkyWalking;APM;Diagnostics @@ -14,11 +14,18 @@ - - + + + + + + + + + diff --git a/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj b/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj index 76025c6b..3cefe65e 100644 --- a/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj +++ b/test/SkyApm.Core.Tests/SkyApm.Core.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0;netcoreapp3.1;net5.0;net6.0 + netcoreapp3.1;net5.0;net6.0 false From 1af86bb33d6ceb18c4a1450658bf7bbcd6e0e4f6 Mon Sep 17 00:00:00 2001 From: liuhaoyang Date: Mon, 3 Jan 2022 21:06:52 +0800 Subject: [PATCH 9/9] Update README.md --- README.md | 2 +- skyapm-dotnet.sln | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 87f967d4..aac8f550 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ SkyAPM C#/.NET instrument agent > MyGet feed URL https://www.myget.org/F/skyapm-dotnet/api/v3/index.json # Supported -- This project currently supports apps targeting netcoreapp2.0/netframework4.6.1 or higher. +- This project currently supports apps targeting netcoreapp3.1、net5.0、net6.0 or higher. - [Supported middlewares, frameworks and libraries.](docs/Supported-list.md) # Features diff --git a/skyapm-dotnet.sln b/skyapm-dotnet.sln index 12b5dff1..94a51a2a 100644 --- a/skyapm-dotnet.sln +++ b/skyapm-dotnet.sln @@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution items", "solution ProjectSection(SolutionItems) = preProject appveyor.yml = appveyor.yml NuGet.config = NuGet.config + README.md = README.md EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{613F0980-91ED-4064-8E8C-168582EF4AD7}"