diff --git a/.env b/.env index 9deb66be7..a3fd59ffc 100644 --- a/.env +++ b/.env @@ -23,5 +23,4 @@ ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92 #ESHOP_AZURE_STORAGE_MARKETING_KEY= #ESHOP_SERVICE_BUS_USERNAME= #ESHOP_SERVICE_BUS_PASSWORD= -#INSTRUMENTATION_KEY= -#ORCHESTRATOR_TYPE= \ No newline at end of file +#INSTRUMENTATION_KEY= \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml index 8990ebec4..5a4c2828d 100644 --- a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml index 246e938b5..8b48c39d1 100644 --- a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml index 96eba3857..951ce24db 100644 --- a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml index c59b1bdc4..3ad12232a 100644 --- a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml index 608fd7a25..6cffab120 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml @@ -12,7 +12,8 @@ - + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml index 01f86972a..d99e1573a 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml @@ -1,7 +1,7 @@  - + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml index 3b50ef8b6..fdeb6fd88 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml @@ -1,7 +1,7 @@  - + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml index 1c32dd6b0..26e50454b 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml @@ -22,14 +22,15 @@ - - - - - - - - + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml index f77d4b08e..f49e04e6b 100644 --- a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml @@ -1,7 +1,7 @@  - + \ No newline at end of file diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index 190af72ee..f54db4697 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -209,13 +209,17 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API private void RegisterAppInsights(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); - - if (Configuration.GetValue("OrchestratorType").Equals("K8S")) + var orchestratorType = Configuration.GetValue("OrchestratorType"); + if (string.IsNullOrEmpty(orchestratorType)) + { + return; + } + if (orchestratorType.ToUpper().Equals("K8S")) { // Enable K8s telemetry initializer services.EnableKubernetes(); } - if (Configuration.GetValue("OrchestratorType").Equals("SF")) + if (orchestratorType.ToUpper().Equals("SF")) { // Enable SF telemetry initializer services.AddSingleton((serviceProvider) => diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index 34738cd58..bfee8a8d2 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -207,13 +207,17 @@ private void RegisterAppInsights(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); - - if (Configuration.GetValue("OrchestratorType").Equals("K8S")) + var orchestratorType = Configuration.GetValue("OrchestratorType"); + if (string.IsNullOrEmpty(orchestratorType)) + { + return; + } + if (orchestratorType.ToUpper().Equals("K8S")) { // Enable K8s telemetry initializer services.EnableKubernetes(); } - if (Configuration.GetValue("OrchestratorType").Equals("SF")) + if (orchestratorType.ToUpper().Equals("SF")) { // Enable SF telemetry initializer services.AddSingleton((serviceProvider) => diff --git a/src/Services/Identity/Identity.API/Startup.cs b/src/Services/Identity/Identity.API/Startup.cs index dfb368fae..5e958b1b0 100644 --- a/src/Services/Identity/Identity.API/Startup.cs +++ b/src/Services/Identity/Identity.API/Startup.cs @@ -163,13 +163,17 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API private void RegisterAppInsights(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); - - if (Configuration.GetValue("OrchestratorType").Equals("K8S")) + var orchestratorType = Configuration.GetValue("OrchestratorType"); + if (string.IsNullOrEmpty(orchestratorType)) + { + return; + } + if (orchestratorType.ToUpper().Equals("K8S")) { // Enable K8s telemetry initializer services.EnableKubernetes(); } - if (Configuration.GetValue("OrchestratorType").Equals("SF")) + if (orchestratorType.ToUpper().Equals("SF")) { // Enable SF telemetry initializer services.AddSingleton((serviceProvider) => diff --git a/src/Services/Location/Locations.API/Startup.cs b/src/Services/Location/Locations.API/Startup.cs index d2045e70a..645cabb73 100644 --- a/src/Services/Location/Locations.API/Startup.cs +++ b/src/Services/Location/Locations.API/Startup.cs @@ -181,13 +181,17 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API private void RegisterAppInsights(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); - - if (Configuration.GetValue("OrchestratorType").Equals("K8S")) + var orchestratorType = Configuration.GetValue("OrchestratorType"); + if (string.IsNullOrEmpty(orchestratorType)) + { + return; + } + if (orchestratorType.ToUpper().Equals("K8S")) { // Enable K8s telemetry initializer services.EnableKubernetes(); } - if (Configuration.GetValue("OrchestratorType").Equals("SF")) + if (orchestratorType.ToUpper().Equals("SF")) { // Enable SF telemetry initializer services.AddSingleton((serviceProvider) => diff --git a/src/Services/Marketing/Marketing.API/Startup.cs b/src/Services/Marketing/Marketing.API/Startup.cs index 92bb95aad..da805f0e8 100644 --- a/src/Services/Marketing/Marketing.API/Startup.cs +++ b/src/Services/Marketing/Marketing.API/Startup.cs @@ -212,13 +212,17 @@ private void RegisterAppInsights(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); - - if (Configuration.GetValue("OrchestratorType").Equals("K8S")) + var orchestratorType = Configuration.GetValue("OrchestratorType"); + if (string.IsNullOrEmpty(orchestratorType)) + { + return; + } + if (orchestratorType.ToUpper().Equals("K8S")) { // Enable K8s telemetry initializer services.EnableKubernetes(); } - if (Configuration.GetValue("OrchestratorType").Equals("SF")) + if (orchestratorType.ToUpper().Equals("SF")) { // Enable SF telemetry initializer services.AddSingleton((serviceProvider) => diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs index b5e2e1729..a61f7ed83 100644 --- a/src/Services/Ordering/Ordering.API/Startup.cs +++ b/src/Services/Ordering/Ordering.API/Startup.cs @@ -234,13 +234,17 @@ private void RegisterAppInsights(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); - - if (Configuration.GetValue("OrchestratorType").Equals("K8S")) + var orchestratorType = Configuration.GetValue("OrchestratorType"); + if (string.IsNullOrEmpty(orchestratorType)) + { + return; + } + if (orchestratorType.ToUpper().Equals("K8S")) { // Enable K8s telemetry initializer services.EnableKubernetes(); } - if (Configuration.GetValue("OrchestratorType").Equals("SF")) + if (orchestratorType.ToUpper().Equals("SF")) { // Enable SF telemetry initializer services.AddSingleton((serviceProvider) => diff --git a/src/Services/Payment/Payment.API/Startup.cs b/src/Services/Payment/Payment.API/Startup.cs index d3729a6f5..6f88785cc 100644 --- a/src/Services/Payment/Payment.API/Startup.cs +++ b/src/Services/Payment/Payment.API/Startup.cs @@ -110,13 +110,17 @@ namespace Payment.API private void RegisterAppInsights(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); - - if (Configuration.GetValue("OrchestratorType").Equals("K8S")) + var orchestratorType = Configuration.GetValue("OrchestratorType"); + if (string.IsNullOrEmpty(orchestratorType)) + { + return; + } + if (orchestratorType.ToUpper().Equals("K8S")) { // Enable K8s telemetry initializer services.EnableKubernetes(); } - if (Configuration.GetValue("OrchestratorType").Equals("SF")) + if (orchestratorType.ToUpper().Equals("SF")) { // Enable SF telemetry initializer services.AddSingleton((serviceProvider) => diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs index d90cb82c9..0dd967e41 100644 --- a/src/Web/WebMVC/Startup.cs +++ b/src/Web/WebMVC/Startup.cs @@ -180,13 +180,17 @@ namespace Microsoft.eShopOnContainers.WebMVC private void RegisterAppInsights(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); - - if (Configuration.GetValue("OrchestratorType").Equals("K8S")) + var orchestratorType = Configuration.GetValue("OrchestratorType"); + if (string.IsNullOrEmpty(orchestratorType)) + { + return; + } + if (orchestratorType.ToUpper().Equals("K8S")) { // Enable K8s telemetry initializer services.EnableKubernetes(); } - if (Configuration.GetValue("OrchestratorType").Equals("SF")) + if (orchestratorType.ToUpper().Equals("SF")) { // Enable SF telemetry initializer services.AddSingleton((serviceProvider) => diff --git a/src/Web/WebSPA/Startup.cs b/src/Web/WebSPA/Startup.cs index 8750d4974..56e3118e7 100644 --- a/src/Web/WebSPA/Startup.cs +++ b/src/Web/WebSPA/Startup.cs @@ -134,13 +134,17 @@ namespace eShopConContainers.WebSPA private void RegisterAppInsights(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); - - if (Configuration.GetValue("OrchestratorType").Equals("K8S")) + var orchestratorType = Configuration.GetValue("OrchestratorType"); + if (string.IsNullOrEmpty(orchestratorType)) + { + return; + } + if (orchestratorType.ToUpper().Equals("K8S")) { // Enable K8s telemetry initializer services.EnableKubernetes(); } - if (Configuration.GetValue("OrchestratorType").Equals("SF")) + if (orchestratorType.ToUpper().Equals("SF")) { // Enable SF telemetry initializer services.AddSingleton((serviceProvider) => diff --git a/src/Web/WebStatus/Startup.cs b/src/Web/WebStatus/Startup.cs index 443c660e7..a17fd00f8 100644 --- a/src/Web/WebStatus/Startup.cs +++ b/src/Web/WebStatus/Startup.cs @@ -87,13 +87,17 @@ namespace WebStatus private void RegisterAppInsights(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); - - if (Configuration.GetValue("OrchestratorType").Equals("K8S")) + var orchestratorType = Configuration.GetValue("OrchestratorType"); + if (string.IsNullOrEmpty(orchestratorType)) + { + return; + } + if (orchestratorType.ToUpper().Equals("K8S")) { // Enable K8s telemetry initializer services.EnableKubernetes(); } - if (Configuration.GetValue("OrchestratorType").Equals("SF")) + if (orchestratorType.ToUpper().Equals("SF")) { // Enable SF telemetry initializer services.AddSingleton((serviceProvider) =>