diff --git a/Clients/CompatApiClient/CompatApiClient.csproj b/Clients/CompatApiClient/CompatApiClient.csproj index 91fea613..31d6c8b0 100644 --- a/Clients/CompatApiClient/CompatApiClient.csproj +++ b/Clients/CompatApiClient/CompatApiClient.csproj @@ -17,7 +17,7 @@ - + diff --git a/Clients/GithubClient/GithubClient.csproj b/Clients/GithubClient/GithubClient.csproj index b180bd6e..a0c0ef87 100644 --- a/Clients/GithubClient/GithubClient.csproj +++ b/Clients/GithubClient/GithubClient.csproj @@ -6,7 +6,7 @@ - + diff --git a/CompatBot/Commands/BotStats.cs b/CompatBot/Commands/BotStats.cs index 7f2eeac1..44437658 100644 --- a/CompatBot/Commands/BotStats.cs +++ b/CompatBot/Commands/BotStats.cs @@ -74,7 +74,7 @@ internal sealed class BotStats: BaseCommandModuleCustom .Append(File.Exists(Config.GoogleApiConfigPath) ? "✅" : "❌").AppendLine(" Google Drive") .Append(string.IsNullOrEmpty(Config.AzureDevOpsToken) ? "❌" : "✅").AppendLine(" Azure DevOps") .Append(string.IsNullOrEmpty(Config.AzureComputerVisionKey) ? "❌" : "✅").AppendLine(" Computer Vision") - .Append(string.IsNullOrEmpty(Config.AzureAppInsightsKey) ? "❌" : "✅").AppendLine(" AppInsights") + .Append(string.IsNullOrEmpty(Config.AzureAppInsightsConnectionString) ? "❌" : "✅").AppendLine(" AppInsights") .Append(string.IsNullOrEmpty(Config.GithubToken) ? "❌" : "✅").AppendLine(" Github") .ToString() .Trim(); diff --git a/CompatBot/CompatBot.csproj b/CompatBot/CompatBot.csproj index 33f41f36..4842946f 100644 --- a/CompatBot/CompatBot.csproj +++ b/CompatBot/CompatBot.csproj @@ -39,10 +39,10 @@ - - - - + + + + @@ -50,21 +50,21 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - - + + diff --git a/CompatBot/Config.cs b/CompatBot/Config.cs index 7d75718f..c322a724 100644 --- a/CompatBot/Config.cs +++ b/CompatBot/Config.cs @@ -82,7 +82,7 @@ internal static class Config public static string AzureComputerVisionKey => config.GetValue(nameof(AzureComputerVisionKey), ""); public static string AzureComputerVisionEndpoint => config.GetValue(nameof(AzureComputerVisionEndpoint), "https://westeurope.api.cognitive.microsoft.com/"); public static Guid AzureDevOpsProjectId => config.GetValue(nameof(AzureDevOpsProjectId), new Guid("3598951b-4d39-4fad-ad3b-ff2386a649de")); - public static string AzureAppInsightsKey => config.GetValue(nameof(AzureAppInsightsKey), ""); + public static string AzureAppInsightsConnectionString => config.GetValue(nameof(AzureAppInsightsConnectionString), ""); public static string GithubToken => config.GetValue(nameof(GithubToken), ""); public static string PreferredFontFamily => config.GetValue(nameof(PreferredFontFamily), ""); public static string LogPath => config.GetValue(nameof(LogPath), "./logs/"); // paths are relative to the working directory @@ -305,14 +305,14 @@ internal static class Config { get { - if (string.IsNullOrEmpty(AzureAppInsightsKey)) + if (string.IsNullOrEmpty(AzureAppInsightsConnectionString)) return null; - if (telemetryClient?.InstrumentationKey == AzureAppInsightsKey) + if (telemetryClient?.InstrumentationKey == AzureAppInsightsConnectionString) return telemetryClient; var telemetryConfig = TelemetryConfiguration.CreateDefault(); - telemetryConfig.InstrumentationKey = AzureAppInsightsKey; + telemetryConfig.ConnectionString = AzureAppInsightsConnectionString; telemetryConfig.TelemetryInitializers.Add(new HttpDependenciesParsingTelemetryInitializer()); DependencyTrackingTelemetryModule.Initialize(telemetryConfig); PerformanceCollectorModule.Initialize(telemetryConfig); diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 64de56ea..e826d0d8 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -5,7 +5,7 @@ - + all