diff --git a/libraries/integration/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core/ServiceCollectionExtensions.cs b/libraries/integration/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core/ServiceCollectionExtensions.cs index 4e68b8ac68..64ec5d19a9 100644 --- a/libraries/integration/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core/ServiceCollectionExtensions.cs +++ b/libraries/integration/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core/ServiceCollectionExtensions.cs @@ -5,6 +5,7 @@ using System; using System.Linq; using Microsoft.ApplicationInsights; +using Microsoft.ApplicationInsights.AspNetCore.Extensions; using Microsoft.ApplicationInsights.Extensibility; using Microsoft.Bot.Builder.ApplicationInsights; using Microsoft.Bot.Configuration; @@ -58,7 +59,7 @@ public static IServiceCollection AddBotApplicationInsights(this IServiceCollecti if (appInsightService != null) { // Create Application Insights options and disable adaptive sampling - var aiOptions = new Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions + var aiOptions = new ApplicationInsightsServiceOptions { EnableAdaptiveSampling = false, InstrumentationKey = appInsightService.InstrumentationKey @@ -99,7 +100,7 @@ public static IServiceCollection AddBotApplicationInsights(this IServiceCollecti if (!string.IsNullOrWhiteSpace(instrumentationKey)) { // Create Application Insights options and disable adaptive sampling - var aiOptions = new Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions + var aiOptions = new ApplicationInsightsServiceOptions { EnableAdaptiveSampling = false, InstrumentationKey = instrumentationKey @@ -140,7 +141,7 @@ public static IServiceCollection AddBotApplicationInsights(this IServiceCollecti if (instrumentationKey != null) { // Create Application Insights options and disable adaptive sampling - var aiOptions = new Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions + var aiOptions = new ApplicationInsightsServiceOptions { EnableAdaptiveSampling = false, InstrumentationKey = instrumentationKey