From d0704d1015ff3114d77b539b6f44ebc8ec9789e4 Mon Sep 17 00:00:00 2001 From: JhontSouth Date: Thu, 12 Sep 2024 15:16:33 -0500 Subject: [PATCH] using Microsoft.ApplicationInsights.AspNetCore.Extensions --- .../ServiceCollectionExtensions.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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