From 2603728229a611c5e0a25b9581d7651c949093b1 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 29 Mar 2025 20:44:12 +0800 Subject: [PATCH 1/2] feat(tacking): Enhanced distributed tracking capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 重要变动 1. 增加 [Elastic.Apm.NetCoreAll](https://www.nuget.org/packages/Elastic.Apm.NetCoreAll) 包集成; 2. 将 [OpenTelemetry]([NuGet Gallery | OpenTelemetry](https://www.nuget.org/profiles/OpenTelemetry)) 集成迁移到独立的项目; 3. 增加 [SkyWalking]([NuGet Gallery | skyapm](https://www.nuget.org/profiles/skyapm)) 集成, 这是当前微服务项目使用的默认库. --- Directory.Packages.props | 12 ++ aspnet-core/LINGYUN.MicroService.All.sln | 52 ++++++++ .../LINGYUN.MicroService.TaskManagement.sln | 7 + ...INGYUN.MicroService.WebhooksManagement.sln | 10 ++ .../LINGYUN.MicroService.WechatManagement.sln | 7 + aspnet-core/LINGYUN.MicroService.Workflow.sln | 7 + .../LINGYUN.Abp.Telemetry.APM/FodyWeavers.xml | 3 + .../LINGYUN.Abp.Telemetry.APM.csproj | 24 ++++ .../Telemetry/APM/AbpTelemetryAPMModule.cs | 12 ++ .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 +++++ ...LINGYUN.Abp.Telemetry.OpenTelemetry.csproj | 32 +++++ .../AbpTelemetryOpenTelemetryModule.cs | 106 +++++++++++++++ .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 +++++ .../LINGYUN.Abp.Telemetry.SkyWalking.csproj | 26 ++++ .../AbpTelemetrySkyWalkingModule.cs | 44 +++++++ .../Hosting/HostingEnvironmentProvider.cs | 14 ++ .../Hosting/InstrumentationHostedService.cs | 26 ++++ .../SkyWalkingServiceCollectionExtensions.cs | 118 +++++++++++++++++ .../README.md | 53 ++++++++ .../AuthServerHttpApiHostModule.Configure.cs | 71 +++------- .../AuthServerHttpApiHostModule.cs | 9 +- ...icroService.AuthServer.HttpApi.Host.csproj | 10 +- .../appsettings.json | 3 + .../AuthServerModule.Configure.cs | 123 ++---------------- .../AuthServerModule.cs | 8 +- .../LY.MicroService.AuthServer.csproj | 10 +- .../appsettings.json | 3 + .../LY.MicroService.AuthServer/openiddict.pfx | Bin 0 -> 2660 bytes ...BackendAdminHttpApiHostModule.Configure.cs | 50 ------- .../BackendAdminHttpApiHostModule.cs | 4 +- ...roService.BackendAdmin.HttpApi.Host.csproj | 12 +- .../appsettings.json | 3 + ...entityServerHttpApiHostModule.Configure.cs | 50 ------- .../IdentityServerHttpApiHostModule.cs | 5 +- ...Service.identityServer.HttpApi.Host.csproj | 9 +- .../appsettings.json | 3 + .../IdentityServerModule.Configure.cs | 50 ------- .../IdentityServerModule.cs | 3 +- .../LY.MicroService.IdentityServer.csproj | 9 +- .../appsettings.json | 3 + ...LocalizationManagement.HttpApi.Host.csproj | 9 +- ...onManagementHttpApiHostModule.Configure.cs | 51 -------- ...LocalizationManagementHttpApiHostModule.cs | 3 +- .../appsettings.json | 3 + ...ice.PlatformManagement.HttpApi.Host.csproj | 10 +- ...rmManagementHttpApiHostModule.Configure.cs | 84 ++++-------- .../PlatformManagementHttpApiHostModule.cs | 9 +- .../appsettings.json | 3 + ...ervice.RealtimeMessage.HttpApi.Host.csproj | 9 +- ...ltimeMessageHttpApiHostModule.Configure.cs | 50 ------- .../RealtimeMessageHttpApiHostModule.cs | 3 +- .../appsettings.json | 3 + ...Service.TaskManagement.HttpApi.Host.csproj | 9 +- ...skManagementHttpApiHostModule.Configure.cs | 50 ------- .../TaskManagementHttpApiHostModule.cs | 3 +- .../appsettings.json | 3 + ...ice.WebhooksManagement.HttpApi.Host.csproj | 9 +- ...ksManagementHttpApiHostModule.Configure.cs | 50 ------- .../WebhooksManagementHttpApiHostModule.cs | 3 +- .../appsettings.json | 3 + ...rvice.WechatManagement.HttpApi.Host.csproj | 9 +- ...atManagementHttpApiHostModule.Configure.cs | 50 ------- .../WechatManagementHttpApiHostModule.cs | 3 +- .../appsettings.json | 3 + ...ice.WorkflowManagement.HttpApi.Host.csproj | 13 +- ...owManagementHttpApiHostModule.Configure.cs | 51 -------- .../WorkflowManagementHttpApiHostModule.cs | 4 +- .../appsettings.json | 3 + 70 files changed, 767 insertions(+), 793 deletions(-) create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/FodyWeavers.xml create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/LINGYUN.Abp.Telemetry.APM.csproj create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/LINGYUNG/Abp/Telemetry/APM/AbpTelemetryAPMModule.cs create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/FodyWeavers.xml create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/FodyWeavers.xsd create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/LINGYUN.Abp.Telemetry.OpenTelemetry.csproj create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/LINGYUN/Abp/Telemetry/OpenTelemetry/AbpTelemetryOpenTelemetryModule.cs create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/FodyWeavers.xml create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/FodyWeavers.xsd create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN.Abp.Telemetry.SkyWalking.csproj create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/AbpTelemetrySkyWalkingModule.cs create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/Hosting/HostingEnvironmentProvider.cs create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/Hosting/InstrumentationHostedService.cs create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/Microsoft/Extensions/DependencyInjection/SkyWalkingServiceCollectionExtensions.cs create mode 100644 aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/README.md create mode 100644 aspnet-core/services/LY.MicroService.AuthServer/openiddict.pfx diff --git a/Directory.Packages.props b/Directory.Packages.props index 4558148f5..84780f7af 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -248,11 +248,20 @@ + + + + + + + + + @@ -287,6 +296,9 @@ + + + diff --git a/aspnet-core/LINGYUN.MicroService.All.sln b/aspnet-core/LINGYUN.MicroService.All.sln index 089243ab8..13ceaebd5 100644 --- a/aspnet-core/LINGYUN.MicroService.All.sln +++ b/aspnet-core/LINGYUN.MicroService.All.sln @@ -817,6 +817,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Auditing.HttpAp EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.WeChat.Work.AspNetCore", "framework\wechat\LINGYUN.Abp.WeChat.Work.AspNetCore\LINGYUN.Abp.WeChat.Work.AspNetCore.csproj", "{A54344EB-05A7-A405-5368-4A9C0A60B078}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Saas.DbChecker", "modules\saas\LINGYUN.Abp.Saas.DbChecker\LINGYUN.Abp.Saas.DbChecker.csproj", "{DED16774-635C-D781-4D5B-D1FA56EECF10}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.ForwardedHeader.Tests", "framework\common\LINGYUN.Abp.ForwardedHeader.Tests\LINGYUN.Abp.ForwardedHeader.Tests.csproj", "{8641809A-E25A-2912-6411-208EACE67C16}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Identity.QrCode", "modules\identity\LINGYUN.Abp.Identity.QrCode\LINGYUN.Abp.Identity.QrCode.csproj", "{7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Identity.AspNetCore.QrCode", "modules\identity\LINGYUN.Abp.Identity.AspNetCore.QrCode\LINGYUN.Abp.Identity.AspNetCore.QrCode.csproj", "{C9266D5D-3860-09C3-F566-489BBB57A534}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tracking", "tracking", "{21542881-C560-4CBB-8AB1-CF757071A057}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Telemetry.APM", "framework\telemetry\LINGYUN.Abp.Telemetry.APM\LINGYUN.Abp.Telemetry.APM.csproj", "{F3DF1C3E-7319-48B1-81AB-0284853BB567}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Telemetry.OpenTelemetry", "framework\telemetry\LINGYUN.Abp.Telemetry.OpenTelemetry\LINGYUN.Abp.Telemetry.OpenTelemetry.csproj", "{7D7561CB-5059-4F5F-B736-B97195B46A91}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Telemetry.SkyWalking", "framework\telemetry\LINGYUN.Abp.Telemetry.SkyWalking\LINGYUN.Abp.Telemetry.SkyWalking.csproj", "{5B9CA129-16CE-4BEF-B22D-C084B38B4EDA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2111,6 +2127,34 @@ Global {A54344EB-05A7-A405-5368-4A9C0A60B078}.Debug|Any CPU.Build.0 = Debug|Any CPU {A54344EB-05A7-A405-5368-4A9C0A60B078}.Release|Any CPU.ActiveCfg = Release|Any CPU {A54344EB-05A7-A405-5368-4A9C0A60B078}.Release|Any CPU.Build.0 = Release|Any CPU + {DED16774-635C-D781-4D5B-D1FA56EECF10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DED16774-635C-D781-4D5B-D1FA56EECF10}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DED16774-635C-D781-4D5B-D1FA56EECF10}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DED16774-635C-D781-4D5B-D1FA56EECF10}.Release|Any CPU.Build.0 = Release|Any CPU + {8641809A-E25A-2912-6411-208EACE67C16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8641809A-E25A-2912-6411-208EACE67C16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8641809A-E25A-2912-6411-208EACE67C16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8641809A-E25A-2912-6411-208EACE67C16}.Release|Any CPU.Build.0 = Release|Any CPU + {7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6}.Release|Any CPU.Build.0 = Release|Any CPU + {C9266D5D-3860-09C3-F566-489BBB57A534}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9266D5D-3860-09C3-F566-489BBB57A534}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9266D5D-3860-09C3-F566-489BBB57A534}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9266D5D-3860-09C3-F566-489BBB57A534}.Release|Any CPU.Build.0 = Release|Any CPU + {F3DF1C3E-7319-48B1-81AB-0284853BB567}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3DF1C3E-7319-48B1-81AB-0284853BB567}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3DF1C3E-7319-48B1-81AB-0284853BB567}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3DF1C3E-7319-48B1-81AB-0284853BB567}.Release|Any CPU.Build.0 = Release|Any CPU + {7D7561CB-5059-4F5F-B736-B97195B46A91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D7561CB-5059-4F5F-B736-B97195B46A91}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D7561CB-5059-4F5F-B736-B97195B46A91}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D7561CB-5059-4F5F-B736-B97195B46A91}.Release|Any CPU.Build.0 = Release|Any CPU + {5B9CA129-16CE-4BEF-B22D-C084B38B4EDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B9CA129-16CE-4BEF-B22D-C084B38B4EDA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B9CA129-16CE-4BEF-B22D-C084B38B4EDA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B9CA129-16CE-4BEF-B22D-C084B38B4EDA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -2507,6 +2551,14 @@ Global {B7B63E08-8F62-34F6-FEA5-063267F1FC85} = {A4633711-7FB6-411A-8D08-BB9A0A778046} {7C48C1CA-7E53-4261-A477-454DD3A8402C} = {67DAB2A0-D407-4CAB-8414-AE3D0AC52FC4} {A54344EB-05A7-A405-5368-4A9C0A60B078} = {DD9BE9E7-F6BF-4869-BCD2-82F5072BDA21} + {DED16774-635C-D781-4D5B-D1FA56EECF10} = {D01D859E-4B72-478A-BABD-90F0981652D5} + {8641809A-E25A-2912-6411-208EACE67C16} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E} + {7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6} = {52B5D4F7-237B-4E0A-A167-68442164F70A} + {C9266D5D-3860-09C3-F566-489BBB57A534} = {52B5D4F7-237B-4E0A-A167-68442164F70A} + {21542881-C560-4CBB-8AB1-CF757071A057} = {C5CAD011-DF84-4914-939C-0C029DCEF26F} + {F3DF1C3E-7319-48B1-81AB-0284853BB567} = {21542881-C560-4CBB-8AB1-CF757071A057} + {7D7561CB-5059-4F5F-B736-B97195B46A91} = {21542881-C560-4CBB-8AB1-CF757071A057} + {5B9CA129-16CE-4BEF-B22D-C084B38B4EDA} = {21542881-C560-4CBB-8AB1-CF757071A057} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C95FDF91-16F2-4A8B-A4BE-0E62D1B66718} diff --git a/aspnet-core/LINGYUN.MicroService.TaskManagement.sln b/aspnet-core/LINGYUN.MicroService.TaskManagement.sln index 85ff4aa18..57236d16e 100644 --- a/aspnet-core/LINGYUN.MicroService.TaskManagement.sln +++ b/aspnet-core/LINGYUN.MicroService.TaskManagement.sln @@ -168,6 +168,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Emailing.Platfo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Sms.Platform", "modules\platform\LINGYUN.Abp.Sms.Platform\LINGYUN.Abp.Sms.Platform.csproj", "{8298C4A6-5275-D7A2-9A5C-99B5F2D0E7A0}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Telemetry.SkyWalking", "framework\telemetry\LINGYUN.Abp.Telemetry.SkyWalking\LINGYUN.Abp.Telemetry.SkyWalking.csproj", "{7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -430,6 +432,10 @@ Global {8298C4A6-5275-D7A2-9A5C-99B5F2D0E7A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {8298C4A6-5275-D7A2-9A5C-99B5F2D0E7A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {8298C4A6-5275-D7A2-9A5C-99B5F2D0E7A0}.Release|Any CPU.Build.0 = Release|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -499,6 +505,7 @@ Global {0EA7605E-3364-6EDC-3AC1-F21A9A984B9B} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} {8BAB6A91-865C-A599-BE2A-7C487129D83A} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} {8298C4A6-5275-D7A2-9A5C-99B5F2D0E7A0} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE} = {5A41C31A-B966-418B-B446-5BA1D7E61A62} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E1FD1F4C-D344-408B-97CF-B6F1F6D7D293} diff --git a/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln b/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln index 9396cae62..cc5c8e797 100644 --- a/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln +++ b/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln @@ -163,6 +163,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Sms.Platform", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Emailing.Platform", "modules\platform\LINGYUN.Abp.Emailing.Platform\LINGYUN.Abp.Emailing.Platform.csproj", "{8BAB6A91-865C-A599-BE2A-7C487129D83A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Telemetry.SkyWalking", "framework\telemetry\LINGYUN.Abp.Telemetry.SkyWalking\LINGYUN.Abp.Telemetry.SkyWalking.csproj", "{7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "telemetry", "telemetry", "{CE07B9F4-54E8-4E74-BE14-8E5C1FB7AFC8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -421,6 +425,10 @@ Global {8BAB6A91-865C-A599-BE2A-7C487129D83A}.Debug|Any CPU.Build.0 = Debug|Any CPU {8BAB6A91-865C-A599-BE2A-7C487129D83A}.Release|Any CPU.ActiveCfg = Release|Any CPU {8BAB6A91-865C-A599-BE2A-7C487129D83A}.Release|Any CPU.Build.0 = Release|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -502,6 +510,8 @@ Global {0EA7605E-3364-6EDC-3AC1-F21A9A984B9B} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} {8298C4A6-5275-D7A2-9A5C-99B5F2D0E7A0} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} {8BAB6A91-865C-A599-BE2A-7C487129D83A} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE} = {CE07B9F4-54E8-4E74-BE14-8E5C1FB7AFC8} + {CE07B9F4-54E8-4E74-BE14-8E5C1FB7AFC8} = {03B4B0AA-83CE-4E4B-9CE2-47369BF88B97} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {80ED12A5-C899-459F-A181-ADCC9D680DE5} diff --git a/aspnet-core/LINGYUN.MicroService.WechatManagement.sln b/aspnet-core/LINGYUN.MicroService.WechatManagement.sln index e2dab5786..aeee78091 100644 --- a/aspnet-core/LINGYUN.MicroService.WechatManagement.sln +++ b/aspnet-core/LINGYUN.MicroService.WechatManagement.sln @@ -109,6 +109,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.LocalizationMan EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Session", "modules\identity\LINGYUN.Abp.Identity.Session\LINGYUN.Abp.Identity.Session.csproj", "{80EBBECC-EF11-4E5E-91DA-EEECED832F21}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Telemetry.SkyWalking", "framework\telemetry\LINGYUN.Abp.Telemetry.SkyWalking\LINGYUN.Abp.Telemetry.SkyWalking.csproj", "{7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -275,6 +277,10 @@ Global {80EBBECC-EF11-4E5E-91DA-EEECED832F21}.Debug|Any CPU.Build.0 = Debug|Any CPU {80EBBECC-EF11-4E5E-91DA-EEECED832F21}.Release|Any CPU.ActiveCfg = Release|Any CPU {80EBBECC-EF11-4E5E-91DA-EEECED832F21}.Release|Any CPU.Build.0 = Release|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -330,6 +336,7 @@ Global {37454EB7-9CE9-4250-92E4-7316F16B5328} = {52701ECE-3EBD-45EC-AD2C-0AAB15322311} {CC8DDC8C-CC0C-4534-8D9F-2C345E065869} = {52701ECE-3EBD-45EC-AD2C-0AAB15322311} {80EBBECC-EF11-4E5E-91DA-EEECED832F21} = {73ED64BB-7C39-42EA-B821-3DD697B9C36A} + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE} = {FFACB4F0-33E0-4F8B-A97E-8FFFA10C12E6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EC9D01C1-EA3C-48C7-A279-4D35C8AD312E} diff --git a/aspnet-core/LINGYUN.MicroService.Workflow.sln b/aspnet-core/LINGYUN.MicroService.Workflow.sln index 4b787bb7b..e26f6f05c 100644 --- a/aspnet-core/LINGYUN.MicroService.Workflow.sln +++ b/aspnet-core/LINGYUN.MicroService.Workflow.sln @@ -187,6 +187,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3.x", "3.x", "{9CD04B74-AA1 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.WorkflowManagement.Next.HttpApi.Host", "services\LY.MicroService.WorkflowManagement.Next.HttpApi.Host\LY.MicroService.WorkflowManagement.Next.HttpApi.Host.csproj", "{09CDA563-DE16-41F6-B61C-56102E7D9B2E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Telemetry.SkyWalking", "framework\telemetry\LINGYUN.Abp.Telemetry.SkyWalking\LINGYUN.Abp.Telemetry.SkyWalking.csproj", "{7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -489,6 +491,10 @@ Global {09CDA563-DE16-41F6-B61C-56102E7D9B2E}.Debug|Any CPU.Build.0 = Debug|Any CPU {09CDA563-DE16-41F6-B61C-56102E7D9B2E}.Release|Any CPU.ActiveCfg = Release|Any CPU {09CDA563-DE16-41F6-B61C-56102E7D9B2E}.Release|Any CPU.Build.0 = Release|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -574,6 +580,7 @@ Global {55400168-8E20-4D10-A3F0-FC591271E71F} = {6CB521FC-AC40-49A6-B9A5-91399CAA59AB} {9CD04B74-AA10-4253-BEEC-4837D48AD3EB} = {6CB521FC-AC40-49A6-B9A5-91399CAA59AB} {09CDA563-DE16-41F6-B61C-56102E7D9B2E} = {9CD04B74-AA10-4253-BEEC-4837D48AD3EB} + {7CF83493-6AF5-9C6D-01A7-AC7FC11BC2CE} = {6DA78E72-BA55-4ECF-97DB-6258174D3E2A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6BB7A5DE-DA12-44DC-BC9B-0F6CA524346F} diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/FodyWeavers.xml b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/FodyWeavers.xml new file mode 100644 index 000000000..5d6962159 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/LINGYUN.Abp.Telemetry.APM.csproj b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/LINGYUN.Abp.Telemetry.APM.csproj new file mode 100644 index 000000000..3042b7def --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/LINGYUN.Abp.Telemetry.APM.csproj @@ -0,0 +1,24 @@ + + + + + + + net8.0;net9.0 + LINGYUN.Abp.Telemetry.APM + LINGYUN.Abp.Telemetry.APM + false + false + false + + + + + + + + + + + + diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/LINGYUNG/Abp/Telemetry/APM/AbpTelemetryAPMModule.cs b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/LINGYUNG/Abp/Telemetry/APM/AbpTelemetryAPMModule.cs new file mode 100644 index 000000000..13d8bed4c --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.APM/LINGYUNG/Abp/Telemetry/APM/AbpTelemetryAPMModule.cs @@ -0,0 +1,12 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.Telemetry.APM; + +public class AbpTelemetryAPMModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAllElasticApm(); + } +} diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/FodyWeavers.xml b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/FodyWeavers.xml new file mode 100644 index 000000000..5d6962159 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/FodyWeavers.xsd b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/LINGYUN.Abp.Telemetry.OpenTelemetry.csproj b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/LINGYUN.Abp.Telemetry.OpenTelemetry.csproj new file mode 100644 index 000000000..94e1a1b88 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/LINGYUN.Abp.Telemetry.OpenTelemetry.csproj @@ -0,0 +1,32 @@ + + + + + + + net8.0;net9.0 + LINGYUN.Abp.Telemetry.OpenTelemetry + LINGYUN.Abp.Telemetry.OpenTelemetry + false + false + false + + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/LINGYUN/Abp/Telemetry/OpenTelemetry/AbpTelemetryOpenTelemetryModule.cs b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/LINGYUN/Abp/Telemetry/OpenTelemetry/AbpTelemetryOpenTelemetryModule.cs new file mode 100644 index 000000000..29d4b1137 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.OpenTelemetry/LINGYUN/Abp/Telemetry/OpenTelemetry/AbpTelemetryOpenTelemetryModule.cs @@ -0,0 +1,106 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using OpenTelemetry; +using OpenTelemetry.Metrics; +using OpenTelemetry.Resources; +using OpenTelemetry.Trace; +using System; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.Telemetry.OpenTelemetry; + +public class AbpTelemetryOpenTelemetryModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + var applicationName = context.Services.GetApplicationName(); + + var openTelmetrySetup = context.Services.GetPreConfigureActions(); + + var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; + if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) + { + var openTelmetryBuilder = context.Services.AddOpenTelemetry() + .ConfigureResource(resource => + { + resource.AddService(applicationName); + }) + .WithTracing(tracing => + { + tracing.AddSource(applicationName); + ConfigureTracing(tracing, configuration); + }) + .WithMetrics(metrics => + { + ConfigureMetrics(metrics, configuration); + }); + + openTelmetrySetup.Configure(openTelmetryBuilder); + } + } + + private static void ConfigureTracing(TracerProviderBuilder tracing, IConfiguration configuration) + { + tracing.AddHttpClientInstrumentation(); + tracing.AddAspNetCoreInstrumentation(); + tracing.AddCapInstrumentation(); + tracing.AddEntityFrameworkCoreInstrumentation(efcore => + { + efcore.SetDbStatementForText = configuration.GetValue( + "OpenTelemetry:EntityFrameworkCore:SetDbStatementForText", + efcore.SetDbStatementForText); + + efcore.SetDbStatementForStoredProcedure = configuration.GetValue( + "OpenTelemetry:EntityFrameworkCore:SetDbStatementForStoredProcedure", + efcore.SetDbStatementForStoredProcedure); + }); + + if (configuration.GetValue("OpenTelemetry:Console:IsEnabled", false)) + { + tracing.AddConsoleExporter(); + } + + var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; + if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) + { + tracing.AddOtlpExporter(otlpOptions => + { + otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); + }); + return; + } + + var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; + if (!zipkinEndpoint.IsNullOrWhiteSpace()) + { + tracing.AddZipkinExporter(zipKinOptions => + { + zipKinOptions.Endpoint = new Uri(zipkinEndpoint); + }); + return; + } + } + + private static void ConfigureMetrics(MeterProviderBuilder metrics, IConfiguration configuration) + { + metrics.AddRuntimeInstrumentation(); + metrics.AddHttpClientInstrumentation(); + metrics.AddAspNetCoreInstrumentation(); + + if (configuration.GetValue("OpenTelemetry:Console:IsEnabled", false)) + { + metrics.AddConsoleExporter(); + } + + var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; + if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) + { + metrics.AddOtlpExporter(otlpOptions => + { + otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); + }); + return; + } + } +} diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/FodyWeavers.xml b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/FodyWeavers.xml new file mode 100644 index 000000000..5d6962159 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/FodyWeavers.xsd b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN.Abp.Telemetry.SkyWalking.csproj b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN.Abp.Telemetry.SkyWalking.csproj new file mode 100644 index 000000000..0b98140e2 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN.Abp.Telemetry.SkyWalking.csproj @@ -0,0 +1,26 @@ + + + + + + + net8.0;net9.0 + LINGYUN.Abp.Telemetry.SkyWalking + LINGYUN.Abp.Telemetry.SkyWalking + false + false + false + + + + + + + + + + + + + + diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/AbpTelemetrySkyWalkingModule.cs b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/AbpTelemetrySkyWalkingModule.cs new file mode 100644 index 000000000..7e7c7832c --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/AbpTelemetrySkyWalkingModule.cs @@ -0,0 +1,44 @@ +using Microsoft.Extensions.DependencyInjection; +using SkyApm.AspNetCore.Diagnostics; +using SkyApm.Diagnostics.CAP; +using SkyApm.Utilities.DependencyInjection; +using System; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.Telemetry.SkyWalking; + +public class AbpTelemetrySkyWalkingModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + var isSkywalkingEnabled = configuration["SkyWalking:Enable"]; + if (isSkywalkingEnabled.IsNullOrWhiteSpace() || "false".Equals(isSkywalkingEnabled.ToLower())) + { + return; + } + + var applicationName = configuration["SkyWalking:ServiceName"]; + if (applicationName.IsNullOrWhiteSpace()) + { + applicationName = context.Services.GetApplicationName(); + } + + if (applicationName.IsNullOrWhiteSpace()) + { + return; + } + + Environment.SetEnvironmentVariable("SKYWALKING__SERVICENAME", applicationName); + + var skywalkingSetup = context.Services.GetPreConfigureActions(); + + context.Services.AddSkyWalking(setup => + { + setup.AddAspNetCoreHosting(); + setup.AddCap(); + + skywalkingSetup.Configure(setup); + }); + } +} diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/Hosting/HostingEnvironmentProvider.cs b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/Hosting/HostingEnvironmentProvider.cs new file mode 100644 index 000000000..b23f4ccf0 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/Hosting/HostingEnvironmentProvider.cs @@ -0,0 +1,14 @@ +using Microsoft.Extensions.Hosting; +using SkyApm; + +namespace LINGYUN.Abp.Telemetry.SkyWalking.Hosting; + +internal class HostingEnvironmentProvider : IEnvironmentProvider +{ + public string EnvironmentName { get; } + + public HostingEnvironmentProvider(IHostEnvironment hostingEnvironment) + { + EnvironmentName = hostingEnvironment.EnvironmentName; + } +} diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/Hosting/InstrumentationHostedService.cs b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/Hosting/InstrumentationHostedService.cs new file mode 100644 index 000000000..e7004caab --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/LINGYUN/Abp/Telemetry/SkyWalking/Hosting/InstrumentationHostedService.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.Hosting; +using SkyApm; +using System.Threading; +using System.Threading.Tasks; + +namespace LINGYUN.Abp.Telemetry.SkyWalking.Hosting; + +internal class InstrumentationHostedService : IHostedService +{ + private readonly IInstrumentStartup _startup; + + public InstrumentationHostedService(IInstrumentStartup startup) + { + _startup = startup; + } + + public Task StartAsync(CancellationToken cancellationToken) + { + return _startup.StartAsync(cancellationToken); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return _startup.StopAsync(cancellationToken); + } +} diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/Microsoft/Extensions/DependencyInjection/SkyWalkingServiceCollectionExtensions.cs b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/Microsoft/Extensions/DependencyInjection/SkyWalkingServiceCollectionExtensions.cs new file mode 100644 index 000000000..6b6a942a6 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/Microsoft/Extensions/DependencyInjection/SkyWalkingServiceCollectionExtensions.cs @@ -0,0 +1,118 @@ +using LINGYUN.Abp.Telemetry.SkyWalking.Hosting; +using Microsoft.Extensions.Hosting; +using SkyApm; +using SkyApm.Config; +using SkyApm.Diagnostics; +using SkyApm.Diagnostics.EntityFrameworkCore; +using SkyApm.Diagnostics.Grpc; +using SkyApm.Diagnostics.Grpc.Net.Client; +using SkyApm.Diagnostics.HttpClient; +using SkyApm.Diagnostics.MSLogging; +using SkyApm.Diagnostics.SqlClient; +using SkyApm.Logging; +using SkyApm.PeerFormatters.MySqlConnector; +using SkyApm.PeerFormatters.SqlClient; +using SkyApm.Sampling; +using SkyApm.Service; +using SkyApm.Tracing; +using SkyApm.Transport; +using SkyApm.Transport.Grpc; +using SkyApm.Utilities.Configuration; +using SkyApm.Utilities.DependencyInjection; +using SkyApm.Utilities.Logging; +using System; +using Volo.Abp; + +namespace Microsoft.Extensions.DependencyInjection; + +internal static class SkyWalkingServiceCollectionExtensions +{ + public static IServiceCollection AddSkyWalking(this IServiceCollection services, Action extensionsSetup = null) + { + Check.NotNull(extensionsSetup, nameof(extensionsSetup)); + + services.AddSingleton(); + 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.AddTracing() + .AddSampling() + .AddGrpcTransport() + .AddSkyApmLogging(); + + var skyWalking = services + .AddSkyApmExtensions() + .AddHttpClient() + .AddGrpcClient() + .AddSqlClient() + .AddGrpc() + .AddEntityFrameworkCore(delegate (DatabaseProviderBuilder c) + { + c.AddPomeloMysql().AddNpgsql().AddSqlite(); + }) + .AddMSLogging() + .AddSqlClientPeerFormatter() + .AddMySqlConnectorPeerFormatter(); + + extensionsSetup?.Invoke(skyWalking); + + return services; + } + + private static IServiceCollection AddTracing(this IServiceCollection services) + { + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + return services; + } + + private static IServiceCollection AddSampling(this IServiceCollection services) + { + services.AddSingleton(); + services.AddSingleton((Func)((IServiceProvider p) => p.GetService())); + services.AddSingleton((Func)((IServiceProvider p) => p.GetService())); + services.AddSingleton(); + services.AddSingleton(); + return services; + } + + private static IServiceCollection AddGrpcTransport(this IServiceCollection services) + { + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + return services; + } + + private static IServiceCollection AddSkyApmLogging(this IServiceCollection services) + { + services.AddSingleton(); + return services; + } +} diff --git a/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/README.md b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/README.md new file mode 100644 index 000000000..84228b8b7 --- /dev/null +++ b/aspnet-core/framework/telemetry/LINGYUN.Abp.Telemetry.SkyWalking/README.md @@ -0,0 +1,53 @@ +# LINGYUN.Abp.Telemetry.SkyWalking + +分布式追踪系统 `SkyWalking` 集成 + +## 功能特性 + + +## 模块引用 + +```csharp +[DependsOn(typeof(AbpTelemetrySkyWalkingModule))] +public class YouProjectModule : AbpModule +{ + // other +} +``` + +## 配置项 + +```shell + +# 切换到主程序目录 +cd my-host-project-path + +# 安装 skyapm 命令行工具 +dotnet tool install -g SkyAPM.DotNet.CLI + +# 生成 SkyWalking 配置文件, localhost:11800 为你运行的SkyWalking实例暴露的Grpc端口 +dotnet skyapm config auth_server localhost:11800 +``` + +```csharp + +public class YouProjectModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(skyapm => + { + skyapm.AddCap(); + + // other... + }); + } +} + + +``` + +## 更多文档 + +* [SkyWalking](https://skywalking.apache.org/) +* [SkyWalking .NET](https://github.com/SkyAPM/SkyAPM-dotnet) diff --git a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs index dc535d3a0..987b440e9 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs @@ -1,4 +1,5 @@ using DotNetCore.CAP; +using LINGYUN.Abp.BlobStoring.OssManagement; using LINGYUN.Abp.ExceptionHandling; using LINGYUN.Abp.ExceptionHandling.Emailing; using LINGYUN.Abp.Identity.Session; @@ -21,9 +22,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.IdentityModel.Logging; using Microsoft.OpenApi.Models; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using StackExchange.Redis; using System; using System.Linq; @@ -33,6 +31,7 @@ using Volo.Abp; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Auditing; using Volo.Abp.Authorization.Permissions; +using Volo.Abp.BlobStoring; using Volo.Abp.Caching; using Volo.Abp.Data; using Volo.Abp.Domain.Entities.Events.Distributed; @@ -56,7 +55,6 @@ namespace LY.MicroService.AuthServer; public partial class AuthServerHttpApiHostModule { public static string ApplicationName { get; set; } = "AuthService"; - protected const string DefaultCorsPolicyName = "Default"; private readonly static OneTimeRunner OneTimeRunner = new OneTimeRunner(); @@ -115,6 +113,22 @@ public partial class AuthServerHttpApiHostModule }); } + private void ConfigureBlobStoring(IConfiguration configuration) + { + Configure(options => + { + // all container use oss management + options.Containers.ConfigureAll((containerName, containerConfiguration) => + { + // use oss management + containerConfiguration.UseOssManagement(config => + { + config.Bucket = configuration[OssManagementBlobProviderConfigurationNames.Bucket]; + }); + }); + }); + } + private void ConfigureDbContext() { // 配置Ef @@ -259,53 +273,6 @@ public partial class AuthServerHttpApiHostModule } } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureTiming(IConfiguration configuration) { Configure(options => @@ -458,7 +425,7 @@ public partial class AuthServerHttpApiHostModule { services.AddCors(options => { - options.AddPolicy(DefaultCorsPolicyName, builder => + options.AddDefaultPolicy(builder => { builder .WithOrigins( diff --git a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.cs index 5893145dc..649d485e7 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.cs @@ -4,6 +4,7 @@ using LINGYUN.Abp.AspNetCore.Mvc.Localization; using LINGYUN.Abp.AspNetCore.Mvc.Wrapper; using LINGYUN.Abp.AuditLogging.Elasticsearch; using LINGYUN.Abp.Authorization.OrganizationUnits; +using LINGYUN.Abp.BlobStoring.OssManagement; using LINGYUN.Abp.Claims.Mapping; using LINGYUN.Abp.Emailing.Platform; using LINGYUN.Abp.EventBus.CAP; @@ -22,6 +23,7 @@ using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Platform; +using LINGYUN.Abp.Telemetry.SkyWalking; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; @@ -69,6 +71,7 @@ namespace LY.MicroService.AuthServer; typeof(AbpAuthorizationOrganizationUnitsModule), typeof(AbpAuditLoggingElasticsearchModule), typeof(AbpEmailingExceptionHandlingModule), + typeof(AbpBlobStoringOssManagementModule), typeof(AbpCAPEventBusModule), typeof(AbpHttpClientModule), typeof(AbpSmsPlatformModule), @@ -79,6 +82,7 @@ namespace LY.MicroService.AuthServer; typeof(AbpIdentitySessionAspNetCoreModule), typeof(AbpAspNetCoreHttpOverridesModule), typeof(AbpAspNetCoreMvcWrapperModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpExporterMiniExcelModule), typeof(AbpClaimsMappingModule), typeof(AbpAutofacModule) @@ -110,6 +114,7 @@ public partial class AuthServerHttpApiHostModule : AbpModule ConfigureVirtualFileSystem(); ConfigureFeatureManagement(); ConfigurePermissionManagement(); + ConfigureBlobStoring(configuration); ConfigureUrls(configuration); ConfigureCaching(configuration); ConfigureTiming(configuration); @@ -119,7 +124,6 @@ public partial class AuthServerHttpApiHostModule : AbpModule ConfigureJsonSerializer(configuration); ConfigureMvc(context.Services, configuration); ConfigureCors(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLocking(context.Services, configuration); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); } @@ -137,10 +141,9 @@ public partial class AuthServerHttpApiHostModule : AbpModule // 路由 app.UseRouting(); // 跨域 - app.UseCors(DefaultCorsPolicyName); + app.UseCors(); // 认证 app.UseAuthentication(); - app.UseJwtTokenMiddleware(); // 多租户 app.UseMultiTenancy(); // 会话 diff --git a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/LY.MicroService.AuthServer.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/LY.MicroService.AuthServer.HttpApi.Host.csproj index 84143c4f1..18d1a9712 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/LY.MicroService.AuthServer.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/LY.MicroService.AuthServer.HttpApi.Host.csproj @@ -14,7 +14,6 @@ - @@ -23,13 +22,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive --> - - - - - - - @@ -69,6 +61,7 @@ + @@ -85,6 +78,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.json b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.json index 932439784..141b39b93 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/appsettings.json @@ -20,6 +20,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "Serilog": { "MinimumLevel": { "Default": "Debug", diff --git a/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs b/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs index 93e15132d..8db74d0ad 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs @@ -18,7 +18,6 @@ using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Extensions.DependencyInjection; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Caching.StackExchangeRedis; @@ -27,15 +26,9 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.IdentityModel.Logging; using OpenIddict.Validation.AspNetCore; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using StackExchange.Redis; using System; -using System.IO; using System.Linq; -using System.Security.Cryptography; -using System.Security.Cryptography.X509Certificates; using System.Text.Encodings.Web; using System.Text.Unicode; using Volo.Abp.Account.Localization; @@ -129,72 +122,27 @@ public partial class AuthServerModule private void PreConfigureCertificate(IConfiguration configuration, IWebHostEnvironment environment) { - var cerConfig = configuration.GetSection("Certificates"); - if (environment.IsProduction() && - cerConfig.Exists()) - { - // 开发环境下存在证书配置 - // 且证书文件存在则使用自定义的证书文件来启动Ids服务器 - var cerPath = Path.Combine(environment.ContentRootPath, cerConfig["CerPath"]); - if (File.Exists(cerPath)) - { - PreConfigure(options => - { - //https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html - options.AddDevelopmentEncryptionAndSigningCertificate = false; - }); - - var cer = new X509Certificate2(cerPath, cerConfig["Password"]); - - PreConfigure(builder => - { - //https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html - - builder.AddSigningCertificate(cer); - - builder.AddEncryptionCertificate(cer); - - // builder.UseDataProtection(); - }); - } - } - else + if (!environment.IsDevelopment()) { PreConfigure(options => { - //https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html options.AddDevelopmentEncryptionAndSigningCertificate = false; }); PreConfigure(builder => { - //https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html - using (var algorithm = RSA.Create(keySizeInBits: 2048)) - { - var subject = new X500DistinguishedName("CN=Fabrikam Encryption Certificate"); - var request = new CertificateRequest(subject, algorithm, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1); - request.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature, critical: true)); - var certificate = request.CreateSelfSigned(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddYears(2)); - builder.AddSigningCertificate(certificate); - } - - using (var algorithm = RSA.Create(keySizeInBits: 2048)) - { - var subject = new X500DistinguishedName("CN=Fabrikam Signing Certificate"); - var request = new CertificateRequest(subject, algorithm, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1); - request.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment, critical: true)); - var certificate = request.CreateSelfSigned(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddYears(2)); - builder.AddEncryptionCertificate(certificate); - } - - - // builder.UseDataProtection(); - - // 禁用https - builder.UseAspNetCore() - .DisableTransportSecurityRequirement(); + builder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "e1c48393-0c43-11f0-9582-4aecacda42db"); }); } + + PreConfigure(builder => + { + // builder.UseDataProtection(); + + // 禁用https + builder.UseAspNetCore() + .DisableTransportSecurityRequirement(); + }); } private void ConfigureMvc(IServiceCollection services, IConfiguration configuration) @@ -264,53 +212,6 @@ public partial class AuthServerModule } } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureCaching(IConfiguration configuration) { Configure(options => @@ -480,7 +381,7 @@ public partial class AuthServerModule { services.AddCors(options => { - options.AddPolicy(DefaultCorsPolicyName, builder => + options.AddDefaultPolicy(builder => { builder .WithOrigins( diff --git a/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs b/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs index dec785ecd..0fe58bfb3 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs @@ -24,6 +24,7 @@ using LINGYUN.Abp.OpenIddict.WeChat.Work; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Platform; +using LINGYUN.Abp.Telemetry.SkyWalking; using LINGYUN.Abp.WeChat.Work.AspNetCore; using LY.MicroService.AuthServer.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; @@ -72,6 +73,7 @@ namespace LY.MicroService.AuthServer; typeof(AbpLocalizationCultureMapModule), typeof(AbpAspNetCoreMvcWrapperModule), typeof(AbpAspNetCoreHttpOverridesModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpExporterMiniExcelModule), typeof(AbpEmailingPlatformModule), typeof(AbpSmsPlatformModule), @@ -79,8 +81,6 @@ namespace LY.MicroService.AuthServer; )] public partial class AuthServerModule : AbpModule { - private const string DefaultCorsPolicyName = "Default"; - public override void PreConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); @@ -113,7 +113,6 @@ public partial class AuthServerModule : AbpModule ConfigureJsonSerializer(configuration); ConfigureMvc(context.Services, configuration); ConfigureCors(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLocking(context.Services, configuration); ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment()); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); @@ -140,11 +139,12 @@ public partial class AuthServerModule : AbpModule app.UseCorrelationId(); app.MapAbpStaticAssets(); app.UseRouting(); - app.UseCors(DefaultCorsPolicyName); + app.UseCors(); app.UseAuthentication(); app.UseAbpOpenIddictValidation(); app.UseMultiTenancy(); app.UseAbpSession(); + app.UseUnitOfWork(); app.UseDynamicClaims(); app.UseAuthorization(); app.UseAuditing(); diff --git a/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj b/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj index dea6b14be..6966dca54 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj +++ b/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj @@ -18,17 +18,9 @@ - - - - - - - - @@ -65,6 +57,8 @@ + + diff --git a/aspnet-core/services/LY.MicroService.AuthServer/appsettings.json b/aspnet-core/services/LY.MicroService.AuthServer/appsettings.json index f792656a8..3714aa99a 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/appsettings.json +++ b/aspnet-core/services/LY.MicroService.AuthServer/appsettings.json @@ -16,6 +16,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "Serilog": { "MinimumLevel": { "Default": "Information", diff --git a/aspnet-core/services/LY.MicroService.AuthServer/openiddict.pfx b/aspnet-core/services/LY.MicroService.AuthServer/openiddict.pfx new file mode 100644 index 0000000000000000000000000000000000000000..9843cc189518aaad073ac8d1b64c742fe3d995e6 GIT binary patch literal 2660 zcmZXUc{J2}AIE=V#y-e0w(J>V45JW{o53(-yCHklxpYwoNrM?NS6vBt4GTp(5u zg~-7LA#$)YFf)qCy!Jm5^Bjc8{F;F$89`^^{Cf(@0b-&MA!{fiWCbP0!tr0sSk4V$ z%j0``&)nUnfQgB96hegbTh&pcIfwbLMJo3p1-}Q|y)=;)Hg*39Bk@tk3+gmj*oy9` zE_IW0lhn>cD`xrxJna2)0?pGfYpvbhin`&2|1|Q_Fm7Q)%P<&!Ee%0Y8%9Lt7zl9{ z)0g8bo>?WqSPZx|g+y9roE)3J-GLDT!CMbPaT3{sMqm`pEps)XWHw4t0G=Z;;*$tVd7v_$haqa^uyx#d0W=cx|o+3FD95dEv;bw66{r3G1Ju!$1EJ&9D0d`r34 zP2w>fw%x^-b7$+aEG)Bl49;6MTm&hL?z7kPEbZ4VDeibiN^(yadm41IOBHv(e)>1& zQ;9huc7inLx(yve#5F^ee)wsfV`6Yc_M4)XB|v_JL6I39iy_@TKeRqC#|LlhA9FmE zvJh~GHA7Kc9_n`e<@ji_v8E@M-g%0%#-&o;JM6AP2zqVxfg=a(0;U<&Bhreq*^7#%7AiD0{|ESXeZcUq|zY1~)qdIY)wLi4+Tfx9v-V|=noGsSm zA5MmLUXZ{Sz!v%yA{z~!y~hmmjD)?YDpl2mth*%%jBkn|6zrIrva#g%>=;(shj2@qs=sKy^!p?K1UFn&?+o(gJLOv2@_@#4 z&b4E^lN8G*(8-IO5B3`?2`iqja**7Td@GfmH);CR&#N~4dNBeTGC^85u;D3rqWW5% zJp`6pr!E)Xu9sLkPvXzdI6jT#37&NceKt~HT0_uA+?pFjf63^=;ZH`$^vI{2i?T2H zd5cJ`{v5UHCGbfiuWN<%g?s5IdV`Xuvz>JDtM3SLS+**&3P;(PJjaiEIU@R^haK#dHj#|f~5ifs%~u1%j_^EEMMD>lWASj;&Y3YSgTLb7sgM#twpI@lE3;aWFB;6 zDj7JI_v(jv_Mh@om$uv7ZR9=q9)5ENdH-ChBeOu_Q6ZsYvwAWSAB~R+@TlpuoR@h_ zyH+VMz7<+AG6*V%O(&Ot*IT4+JLF5IRAnqAwUH)jw^iDM{j3%TQ-isqpIC0lL!|Eq zB2QEH_V$<_HQlIKV2XZ%B(lydCxq$m(;*HxERt90kE?ZMQldFdJ=>~;mni;!?2#R& z$^wCa002Na{tE?E%_S}X;lODC1DpZSfEr)`=razIQBMQvjErP3bwCx+WORBA1p{a? zI!(swQ;aZR%;+&P=2uk(@F-^%b_5Fu0wSK_1*uv}m;+{j58wd=0#|_`M&N+!fD~}? z?=BQ@V<=t>V#>&2zm)3?Es(+g_{A-MO@=UbcrxyR3|*U*~TaPVQd?kSz$qDQ~##6UzQ+ecxRJ?{Bb@& zBZx3QG$rzoWcGTR^iI-umBx!=Eshh>DP3Q?Ntp>g9DKLxFzyxK)u8`$=q^ed}TLH+mnR@LBOo zWZp03tG-@GrYtv@HLt7-{&~(}lO}45w(G&Lr0NzPe<~yt`24yOUREU4URDbp&U@hQ z@YPEOK7YkCK+e_u)zpxyv1HA_utDLakn9a7XIQw-83_2sy^*-^kEbn|MQWezp|W=Sv`q zQQ4_pDsjgB^Z0Gmiwe86(&I_4l|RF!f|K>a1eJ#7iF$eQ<7NZx%1eCkuQQZ!tpv;X zn2--w+-!s+k*^Y3?yN=z^%ON4(-srqoRx}v$}Y=dP1;ZWJrW?gM!R7#Qaj(wJ)&&t z28we7wXKCw7kuM11ZP&trq3?EpwIIJB-##}G+WO|`t0~y>-vZ*?)+pTVoZB2BED`I zZh<9#41MRH`;1`H1?*nTwbyCXgWP-t5tF$6;oxmng+?c-is?^ z>dgRH*K4h>7}44w`Bs63NI(Ix zD$-PC3DXlAB(Oz*SJja|@8ga%ROXuSBUcevzH`GjG@m91xRq;m zxvsW?J4`d)zLcJ;u(Yl68BwO#Ghc zL;30E)X$T$zI(F{QAym1L^jeJuKd$r`OMsb!~Kj4`O1bFmy~^{aGqb6kuo3x7e7tG zf5fb{%V$EkYI{d^_kR35KQ1yZ2(3d%=Gb=LiKdqXhPoS{>4FBb1*y@%AgZ4oAYzic z`=D#i70W?^+M|1hPadztD%WPT#Jv~YbvW56eT%@yA9If$ZBt>Y(V z--6OcNupR;m=WAyCQ*oh199TbV?7~m*PB;Ur~S&-4 - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureMvc(IServiceCollection services, IConfiguration configuration) { Configure(options => diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs index cabb6e104..9134b1479 100644 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs @@ -29,6 +29,7 @@ using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.SettingManagement; using LINGYUN.Abp.Sms.Platform; +using LINGYUN.Abp.Telemetry.SkyWalking; using LINGYUN.Abp.Tencent.SettingManagement; using LINGYUN.Abp.TextTemplating; using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; @@ -86,6 +87,7 @@ namespace LY.MicroService.BackendAdmin; typeof(AbpAuditingHttpApiModule), typeof(AbpSaasApplicationModule), typeof(AbpSaasHttpApiModule), + typeof(AbpSaasDbCheckerModule), typeof(AbpTextTemplatingApplicationModule), typeof(AbpTextTemplatingHttpApiModule), typeof(AbpCachingManagementApplicationModule), @@ -112,6 +114,7 @@ namespace LY.MicroService.BackendAdmin; typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpEmailingExceptionHandlingModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpHttpClientModule), typeof(AbpSmsPlatformModule), typeof(AbpEmailingPlatformModule), @@ -157,7 +160,6 @@ public partial class BackendAdminHttpApiHostModule : AbpModule ConfigureJsonSerializer(configuration); ConfigureMvc(context.Services, configuration); ConfigureCors(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLocking(context.Services, configuration); ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment()); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj index 9f59d4959..58dedc85c 100644 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj @@ -1,4 +1,4 @@ - + @@ -18,20 +18,12 @@ - - - - - - - - @@ -76,6 +68,7 @@ + @@ -102,6 +95,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.json b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.json index 71b437042..89f205349 100644 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.json @@ -20,6 +20,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "Serilog": { "MinimumLevel": { "Default": "Information", diff --git a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs index 837d15127..aeecd08fb 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs @@ -20,9 +20,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.IdentityModel.Logging; using Microsoft.OpenApi.Models; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using StackExchange.Redis; using System; using System.Collections.Generic; @@ -250,53 +247,6 @@ public partial class IdentityServerHttpApiHostModule }); } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureDistributedLocking(IServiceCollection services, IConfiguration configuration) { var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; diff --git a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.cs index 6c9189f00..367682316 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/IdentityServerHttpApiHostModule.cs @@ -8,9 +8,9 @@ using LINGYUN.Abp.Emailing.Platform; using LINGYUN.Abp.EventBus.CAP; using LINGYUN.Abp.ExceptionHandling.Emailing; using LINGYUN.Abp.Exporter.MiniExcel; +using LINGYUN.Abp.Gdpr; using LINGYUN.Abp.Gdpr.EntityFrameworkCore; using LINGYUN.Abp.Gdpr.Identity; -using LINGYUN.Abp.Gdpr; using LINGYUN.Abp.Identity.Session.AspNetCore; using LINGYUN.Abp.Localization.CultureMap; using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; @@ -18,6 +18,7 @@ using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Platform; +using LINGYUN.Abp.Telemetry.SkyWalking; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; @@ -74,6 +75,7 @@ namespace LY.MicroService.IdentityServer; typeof(AbpLocalizationCultureMapModule), typeof(AbpIdentitySessionAspNetCoreModule), typeof(AbpAspNetCoreMvcWrapperModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpExporterMiniExcelModule), typeof(AbpClaimsMappingModule), typeof(AbpAutofacModule) @@ -114,7 +116,6 @@ public partial class IdentityServerHttpApiHostModule : AbpModule ConfigureJsonSerializer(configuration); ConfigureMvc(context.Services, configuration); ConfigureCors(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLocking(context.Services, configuration); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); } diff --git a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/LY.MicroService.identityServer.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/LY.MicroService.identityServer.HttpApi.Host.csproj index 491b2ea05..b78023562 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/LY.MicroService.identityServer.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/LY.MicroService.identityServer.HttpApi.Host.csproj @@ -22,7 +22,6 @@ - @@ -30,13 +29,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive --> - - - - - - - @@ -76,6 +68,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/appsettings.json b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/appsettings.json index 932439784..141b39b93 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/appsettings.json @@ -20,6 +20,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "Serilog": { "MinimumLevel": { "Default": "Debug", diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.Configure.cs b/aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.Configure.cs index eab69c4d3..7f98ecdf6 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.Configure.cs @@ -23,9 +23,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Hosting; using Microsoft.IdentityModel.Logging; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using StackExchange.Redis; using System; using System.Collections.Generic; @@ -203,53 +200,6 @@ public partial class IdentityServerModule } } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureCaching(IConfiguration configuration) { Configure(options => diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.cs b/aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.cs index 3e67e66ee..4e1c8bd74 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer/IdentityServerModule.cs @@ -23,6 +23,7 @@ using LINGYUN.Abp.Localization.CultureMap; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Platform; +using LINGYUN.Abp.Telemetry.SkyWalking; using LY.MicroService.IdentityServer.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; @@ -69,6 +70,7 @@ namespace LY.MicroService.IdentityServer; typeof(AbpLocalizationCultureMapModule), typeof(AbpAspNetCoreMvcWrapperModule), typeof(AbpAspNetCoreHttpOverridesModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpExporterMiniExcelModule), typeof(AbpEmailingPlatformModule), typeof(AbpSmsPlatformModule), @@ -108,7 +110,6 @@ public partial class IdentityServerModule : AbpModule ConfigureJsonSerializer(configuration); ConfigureMvc(context.Services, configuration); ConfigureCors(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLocking(context.Services, configuration); ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment()); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/LY.MicroService.IdentityServer.csproj b/aspnet-core/services/LY.MicroService.IdentityServer/LY.MicroService.IdentityServer.csproj index 6454c49fe..4076974cd 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/LY.MicroService.IdentityServer.csproj +++ b/aspnet-core/services/LY.MicroService.IdentityServer/LY.MicroService.IdentityServer.csproj @@ -18,7 +18,6 @@ - @@ -33,13 +32,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive --> - - - - - - - @@ -63,6 +55,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/appsettings.json b/aspnet-core/services/LY.MicroService.IdentityServer/appsettings.json index f792656a8..3714aa99a 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/appsettings.json +++ b/aspnet-core/services/LY.MicroService.IdentityServer/appsettings.json @@ -16,6 +16,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "Serilog": { "MinimumLevel": { "Default": "Information", diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LY.MicroService.LocalizationManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LY.MicroService.LocalizationManagement.HttpApi.Host.csproj index 9e9911a73..892587088 100644 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LY.MicroService.LocalizationManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LY.MicroService.LocalizationManagement.HttpApi.Host.csproj @@ -14,20 +14,12 @@ - - - - - - - - @@ -61,6 +53,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs index d3752b7c3..79347f952 100644 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs @@ -18,9 +18,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.IdentityModel.Logging; using Microsoft.OpenApi.Models; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using StackExchange.Redis; using System; using System.Linq; @@ -170,54 +167,6 @@ public partial class LocalizationManagementHttpApiHostModule } } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - - private void ConfigureTiming(IConfiguration configuration) { Configure(options => diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs index effcfd0e4..95a42c372 100644 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs @@ -14,6 +14,7 @@ using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Platform; +using LINGYUN.Abp.Telemetry.SkyWalking; using LY.MicroService.LocalizationManagement.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; @@ -54,6 +55,7 @@ namespace LY.MicroService.LocalizationManagement; typeof(AbpCachingStackExchangeRedisModule), typeof(AbpLocalizationCultureMapModule), typeof(AbpIdentitySessionAspNetCoreModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpHttpClientModule), typeof(AbpSmsPlatformModule), typeof(AbpEmailingPlatformModule), @@ -93,7 +95,6 @@ public partial class LocalizationManagementHttpApiHostModule : AbpModule ConfigureJsonSerializer(configuration); ConfigureMvc(context.Services, configuration); ConfigureCors(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLocking(context.Services, configuration); ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment()); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.json b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.json index a41b921f9..caed0e71c 100644 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/appsettings.json @@ -21,6 +21,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "Serilog": { "MinimumLevel": { "Default": "Debug", diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj index 7f1cecc3a..017a35eab 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj @@ -14,20 +14,12 @@ - - - - - - - - @@ -69,6 +61,7 @@ + @@ -79,6 +72,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs index 35cf1c7ec..42bfba928 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs @@ -22,9 +22,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.IdentityModel.Logging; using Microsoft.OpenApi.Models; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using StackExchange.Redis; using System; using System.IO; @@ -37,6 +34,7 @@ using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Auditing; using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring.FileSystem; +using Volo.Abp.BlobStoring.Minio; using Volo.Abp.Caching; using Volo.Abp.FeatureManagement; using Volo.Abp.GlobalFeatures; @@ -142,18 +140,39 @@ public partial class PlatformManagementHttpApiHostModule }); } - private void ConfigureBlobStoring() + private void ConfigureOssManagement(IServiceCollection services, IConfiguration configuration) { - Configure(options => + var useMinio = configuration.GetValue("OssManagement:UseMinio"); + if (useMinio) { - options.Containers.ConfigureAll((containerName, containerConfiguration) => + Configure(options => { - containerConfiguration.UseFileSystem(fileSystem => + options.Containers.ConfigureAll((containerName, containerConfiguration) => { - fileSystem.BasePath = Path.Combine(Directory.GetCurrentDirectory(), "blobs"); + containerConfiguration.UseMinio(minio => + { + configuration.GetSection("Minio").Bind(minio); + }); }); }); - }); + services.AddMinioContainer(); + } + else + { + Configure(options => + { + options.Containers.ConfigureAll((containerName, containerConfiguration) => + { + containerConfiguration.UseFileSystem(fileSystem => + { + fileSystem.BasePath = Path.Combine( + Directory.GetCurrentDirectory(), + configuration["OssManagement:Bucket"] ?? "blobs"); + }); + }); + }); + services.AddFileSystemContainer(); + } } private void ConfigureExceptionHandling() @@ -211,53 +230,6 @@ public partial class PlatformManagementHttpApiHostModule } } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureTiming(IConfiguration configuration) { Configure(options => diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs index bca6da0c3..4f79f6cf6 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs @@ -15,11 +15,13 @@ using LINGYUN.Abp.Notifications; using LINGYUN.Abp.OssManagement; using LINGYUN.Abp.OssManagement.FileSystem; using LINGYUN.Abp.OssManagement.Imaging; +using LINGYUN.Abp.OssManagement.Minio; using LINGYUN.Abp.OssManagement.SettingManagement; using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Aliyun; +using LINGYUN.Abp.Telemetry.SkyWalking; using LINGYUN.Abp.UI.Navigation.VueVbenAdmin; using LINGYUN.Platform; using LINGYUN.Platform.EntityFrameworkCore; @@ -64,8 +66,9 @@ namespace LY.MicroService.PlatformManagement; typeof(AbpUINavigationVueVbenAdminModule), typeof(PlatformThemeVueVbenAdminModule), // typeof(AbpOssManagementAliyunModule), + typeof(AbpOssManagementMinioModule), // Minio存储提供者模块 typeof(AbpOssManagementFileSystemModule), // 本地文件系统提供者模块 - typeof(AbpOssManagementImagingModule), // 本地文件系统图形处理模块 + typeof(AbpOssManagementImagingModule), // 对象存储图形处理模块 typeof(AbpOssManagementApplicationModule), typeof(AbpOssManagementHttpApiModule), typeof(AbpOssManagementSettingManagementModule), @@ -93,6 +96,7 @@ namespace LY.MicroService.PlatformManagement; typeof(AbpCachingStackExchangeRedisModule), typeof(AbpLocalizationCultureMapModule), typeof(AbpIdentitySessionAspNetCoreModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpHttpClientModule), typeof(AbpMailKitModule), typeof(AbpAliyunSmsModule), @@ -120,7 +124,6 @@ public partial class PlatformManagementHttpApiHostModule : AbpModule var configuration = context.Services.GetConfiguration(); ConfigureWrapper(); - ConfigureBlobStoring(); ConfigureLocalization(); ConfigureKestrelServer(); ConfigureExceptionHandling(); @@ -135,7 +138,7 @@ public partial class PlatformManagementHttpApiHostModule : AbpModule ConfigureJsonSerializer(configuration); ConfigureMvc(context.Services, configuration); ConfigureCors(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); + ConfigureOssManagement(context.Services, configuration); ConfigureDistributedLocking(context.Services, configuration); ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment()); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.json b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.json index 6aafcdcf1..ad3f91183 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/appsettings.json @@ -18,6 +18,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "Serilog": { "MinimumLevel": { "Default": "Information", diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj index 6ac987822..a2f4a020a 100644 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj @@ -18,7 +18,6 @@ - - - - - - - - @@ -69,6 +61,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs index 33c45406e..6c962347f 100644 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs @@ -23,9 +23,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.IdentityModel.Logging; using Microsoft.OpenApi.Models; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using Quartz; using StackExchange.Redis; using System; @@ -232,53 +229,6 @@ public partial class RealtimeMessageHttpApiHostModule } } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureCaching(IConfiguration configuration) { Configure(options => diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs index 95199210f..06b3b3c85 100644 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs @@ -37,6 +37,7 @@ using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Platform; using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; +using LINGYUN.Abp.Telemetry.SkyWalking; using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; using LINGYUN.Abp.TextTemplating.Scriban; using LINGYUN.Abp.WeChat.Official.Handlers; @@ -118,6 +119,7 @@ namespace LY.MicroService.RealtimeMessage; typeof(AbpSmsPlatformModule), typeof(AbpHttpClientModule), typeof(AbpClaimsMappingModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpAspNetCoreMvcWrapperModule), typeof(AbpAspNetCoreHttpOverridesModule), typeof(AbpAutofacModule) @@ -161,7 +163,6 @@ public partial class RealtimeMessageHttpApiHostModule : AbpModule ConfigureSwagger(context.Services); ConfigureMvc(context.Services, configuration); ConfigureCors(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLocking(context.Services, configuration); ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment()); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.json b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.json index a41b921f9..caed0e71c 100644 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.json @@ -21,6 +21,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "Serilog": { "MinimumLevel": { "Default": "Debug", diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj index eb1230ece..3443f8310 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj @@ -12,16 +12,8 @@ - - - - - - - - @@ -59,6 +51,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs index e9c531703..e01b17552 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs @@ -19,9 +19,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.IdentityModel.Logging; using Microsoft.OpenApi.Models; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using Quartz; using StackExchange.Redis; using System; @@ -158,53 +155,6 @@ public partial class TaskManagementHttpApiHostModule } } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureJsonSerializer(IConfiguration configuration) { // 统一时间日期格式 diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs index aaa6fddbd..b8f6b51f7 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs @@ -22,6 +22,7 @@ using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Platform; using LINGYUN.Abp.TaskManagement; using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; +using LINGYUN.Abp.Telemetry.SkyWalking; using LY.MicroService.TaskManagement.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; @@ -80,6 +81,7 @@ namespace LY.MicroService.TaskManagement; typeof(AbpLocalizationCultureMapModule), typeof(AbpAspNetCoreMvcWrapperModule), typeof(AbpAspNetCoreHttpOverridesModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpClaimsMappingModule), typeof(AbpCAPEventBusModule), typeof(AbpAutofacModule) @@ -118,7 +120,6 @@ public partial class TaskManagementHttpApiHostModule : AbpModule ConfigureJsonSerializer(configuration); ConfigureMvc(context.Services, configuration); ConfigureCors(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLock(context.Services, configuration); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); } diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.json b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.json index 717616839..d6851443a 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/appsettings.json @@ -20,6 +20,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "AllowedHosts": "*", "Serilog": { "MinimumLevel": { diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj index ef24803a7..a0e53d6b0 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj @@ -12,16 +12,8 @@ - - - - - - - - @@ -60,6 +52,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs index 2b7603004..a5912378e 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs @@ -22,9 +22,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.IdentityModel.Logging; using Microsoft.OpenApi.Models; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using Quartz; using StackExchange.Redis; using System; @@ -192,53 +189,6 @@ public partial class WebhooksManagementHttpApiHostModule } } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureExceptionHandling() { // 自定义需要处理的异常 diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs index 3a9b1119f..68191fb9e 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs @@ -19,6 +19,7 @@ using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Platform; using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; +using LINGYUN.Abp.Telemetry.SkyWalking; using LINGYUN.Abp.Webhooks.EventBus; using LINGYUN.Abp.Webhooks.Identity; using LINGYUN.Abp.Webhooks.Saas; @@ -81,6 +82,7 @@ namespace LY.MicroService.WebhooksManagement; typeof(AbpClaimsMappingModule), typeof(AbpEmailingPlatformModule), typeof(AbpSmsPlatformModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpAspNetCoreMvcWrapperModule), typeof(AbpAspNetCoreHttpOverridesModule), typeof(AbpIdentitySessionAspNetCoreModule), @@ -121,7 +123,6 @@ public partial class WebhooksManagementHttpApiHostModule : AbpModule ConfigureWebhooks(context.Services); ConfigureJsonSerializer(configuration); ConfigureMvc(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLock(context.Services, configuration); ConfigureBackgroundTasks(context.Services, configuration); ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment()); diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.json b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.json index 52cd1e72e..512099bfd 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/appsettings.json @@ -17,6 +17,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "AllowedHosts": "*", "Serilog": { "MinimumLevel": { diff --git a/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/LY.MicroService.WechatManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/LY.MicroService.WechatManagement.HttpApi.Host.csproj index 5e8ec6282..0acd9d83d 100644 --- a/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/LY.MicroService.WechatManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/LY.MicroService.WechatManagement.HttpApi.Host.csproj @@ -12,16 +12,8 @@ - - - - - - - - @@ -60,6 +52,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.Configure.cs index 717b83c3a..c6837111b 100644 --- a/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.Configure.cs @@ -17,9 +17,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.IdentityModel.Logging; using Microsoft.OpenApi.Models; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using StackExchange.Redis; using System; using System.Collections.Generic; @@ -140,53 +137,6 @@ public partial class WechatManagementHttpApiHostModule } } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureExceptionHandling() { // 自定义需要处理的异常 diff --git a/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.cs index 9b02529f7..9d7da7bec 100644 --- a/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.cs @@ -12,6 +12,7 @@ using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; +using LINGYUN.Abp.Telemetry.SkyWalking; using LINGYUN.Abp.WeChat.MiniProgram; using LINGYUN.Abp.WeChat.Official; using LINGYUN.Abp.WeChat.SettingManagement; @@ -67,6 +68,7 @@ namespace LY.MicroService.WechatManagement; typeof(AbpHttpClientWrapperModule), typeof(AbpMailKitModule), typeof(AbpClaimsMappingModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpAspNetCoreMvcWrapperModule), typeof(AbpAspNetCoreHttpOverridesModule), typeof(AbpIdentitySessionAspNetCoreModule), @@ -106,7 +108,6 @@ public partial class WechatManagementHttpApiHostModule : AbpModule ConfigureSwagger(context.Services); ConfigureJsonSerializer(configuration); ConfigureMvc(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLock(context.Services, configuration); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); } diff --git a/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.json b/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.json index 3e6f3e016..9530c0237 100644 --- a/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/appsettings.json @@ -17,6 +17,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "AllowedHosts": "*", "Serilog": { "MinimumLevel": { diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj index c3ae5c3b0..f4e5be3ca 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj @@ -12,7 +12,6 @@ - @@ -22,13 +21,6 @@ - - - - - - - @@ -68,6 +60,7 @@ + @@ -87,8 +80,4 @@ - - - - diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs index e941447b6..6efe6caa6 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs @@ -4,7 +4,6 @@ using Elsa.Options; using Elsa.Rebus.RabbitMq; using LINGYUN.Abp.BackgroundTasks; using LINGYUN.Abp.BlobStoring.OssManagement; -using LINGYUN.Abp.Elsa.Localization; using LINGYUN.Abp.ExceptionHandling; using LINGYUN.Abp.ExceptionHandling.Emailing; using LINGYUN.Abp.Localization.CultureMap; @@ -24,9 +23,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.IdentityModel.Logging; using Microsoft.OpenApi.Models; -using OpenTelemetry.Metrics; -using OpenTelemetry.Resources; -using OpenTelemetry.Trace; using Quartz; using StackExchange.Redis; using System; @@ -136,53 +132,6 @@ public partial class WorkflowManagementHttpApiHostModule }); } - private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration) - { - var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; - if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) - { - services.AddOpenTelemetry() - .ConfigureResource(resource => - { - resource.AddService(ApplicationName); - }) - .WithTracing(tracing => - { - tracing.AddHttpClientInstrumentation(); - tracing.AddAspNetCoreInstrumentation(); - tracing.AddCapInstrumentation(); - tracing.AddEntityFrameworkCoreInstrumentation(); - tracing.AddSource(ApplicationName); - - var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"]; - if (!tracingOtlpEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddOtlpExporter(otlpOptions => - { - otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint); - }); - return; - } - - var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!zipkinEndpoint.IsNullOrWhiteSpace()) - { - tracing.AddZipkinExporter(zipKinOptions => - { - zipKinOptions.Endpoint = new Uri(zipkinEndpoint); - }); - return; - } - }) - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); - metrics.AddAspNetCoreInstrumentation(); - }); - } - } - private void ConfigureBackgroundTasks(IConfiguration configuration) { Configure(options => diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.cs index 86f8c9f5c..d9b3a7116 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.cs @@ -24,9 +24,9 @@ using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; +using LINGYUN.Abp.Telemetry.SkyWalking; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.HttpOverrides; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Volo.Abp; @@ -87,6 +87,7 @@ namespace LY.MicroService.WorkflowManagement; typeof(AbpAspNetCoreMvcWrapperModule), typeof(AbpMailKitModule), typeof(AbpClaimsMappingModule), + typeof(AbpTelemetrySkyWalkingModule), typeof(AbpAspNetCoreMvcNewtonsoftModule), typeof(AbpAspNetCoreHttpOverridesModule), typeof(AbpIdentitySessionAspNetCoreModule), @@ -126,7 +127,6 @@ public partial class WorkflowManagementHttpApiHostModule : AbpModule ConfigureMvc(context.Services, configuration); ConfigureCors(context.Services, configuration); ConfigureBlobStoring(context.Services, configuration); - ConfigureOpenTelemetry(context.Services, configuration); ConfigureDistributedLock(context.Services, configuration); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.json b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.json index ca3473751..019eb39de 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.json @@ -17,6 +17,9 @@ "yyyy-MM-ddTHH:mm:ss" ] }, + "SkyWalking": { + "Enable": false + }, "AllowedHosts": "*", "Hosting": { "BasePath": "" From 8c561365854304744c27f91708ea29da9b1ee277 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 29 Mar 2025 20:47:01 +0800 Subject: [PATCH 2/2] fix: Remove the solution project --- aspnet-core/LINGYUN.MicroService.All.sln | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/aspnet-core/LINGYUN.MicroService.All.sln b/aspnet-core/LINGYUN.MicroService.All.sln index 13ceaebd5..4d6d6a604 100644 --- a/aspnet-core/LINGYUN.MicroService.All.sln +++ b/aspnet-core/LINGYUN.MicroService.All.sln @@ -817,10 +817,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Auditing.HttpAp EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.WeChat.Work.AspNetCore", "framework\wechat\LINGYUN.Abp.WeChat.Work.AspNetCore\LINGYUN.Abp.WeChat.Work.AspNetCore.csproj", "{A54344EB-05A7-A405-5368-4A9C0A60B078}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Saas.DbChecker", "modules\saas\LINGYUN.Abp.Saas.DbChecker\LINGYUN.Abp.Saas.DbChecker.csproj", "{DED16774-635C-D781-4D5B-D1FA56EECF10}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.ForwardedHeader.Tests", "framework\common\LINGYUN.Abp.ForwardedHeader.Tests\LINGYUN.Abp.ForwardedHeader.Tests.csproj", "{8641809A-E25A-2912-6411-208EACE67C16}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Identity.QrCode", "modules\identity\LINGYUN.Abp.Identity.QrCode\LINGYUN.Abp.Identity.QrCode.csproj", "{7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Identity.AspNetCore.QrCode", "modules\identity\LINGYUN.Abp.Identity.AspNetCore.QrCode\LINGYUN.Abp.Identity.AspNetCore.QrCode.csproj", "{C9266D5D-3860-09C3-F566-489BBB57A534}" @@ -2127,14 +2123,6 @@ Global {A54344EB-05A7-A405-5368-4A9C0A60B078}.Debug|Any CPU.Build.0 = Debug|Any CPU {A54344EB-05A7-A405-5368-4A9C0A60B078}.Release|Any CPU.ActiveCfg = Release|Any CPU {A54344EB-05A7-A405-5368-4A9C0A60B078}.Release|Any CPU.Build.0 = Release|Any CPU - {DED16774-635C-D781-4D5B-D1FA56EECF10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DED16774-635C-D781-4D5B-D1FA56EECF10}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DED16774-635C-D781-4D5B-D1FA56EECF10}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DED16774-635C-D781-4D5B-D1FA56EECF10}.Release|Any CPU.Build.0 = Release|Any CPU - {8641809A-E25A-2912-6411-208EACE67C16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8641809A-E25A-2912-6411-208EACE67C16}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8641809A-E25A-2912-6411-208EACE67C16}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8641809A-E25A-2912-6411-208EACE67C16}.Release|Any CPU.Build.0 = Release|Any CPU {7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6}.Debug|Any CPU.Build.0 = Debug|Any CPU {7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -2551,8 +2539,6 @@ Global {B7B63E08-8F62-34F6-FEA5-063267F1FC85} = {A4633711-7FB6-411A-8D08-BB9A0A778046} {7C48C1CA-7E53-4261-A477-454DD3A8402C} = {67DAB2A0-D407-4CAB-8414-AE3D0AC52FC4} {A54344EB-05A7-A405-5368-4A9C0A60B078} = {DD9BE9E7-F6BF-4869-BCD2-82F5072BDA21} - {DED16774-635C-D781-4D5B-D1FA56EECF10} = {D01D859E-4B72-478A-BABD-90F0981652D5} - {8641809A-E25A-2912-6411-208EACE67C16} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E} {7A8A4C74-4B5F-F352-7AC3-54F54AFC3FD6} = {52B5D4F7-237B-4E0A-A167-68442164F70A} {C9266D5D-3860-09C3-F566-489BBB57A534} = {52B5D4F7-237B-4E0A-A167-68442164F70A} {21542881-C560-4CBB-8AB1-CF757071A057} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}