From 21f614bb2e7faeeafb694a99e633f109a368f9ee Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 23 Oct 2017 09:03:27 -0400 Subject: [PATCH] disable app insights telemetry from core.all libs --- src/Icons/Startup.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Icons/Startup.cs b/src/Icons/Startup.cs index 2c9e365c1..6e61f5796 100644 --- a/src/Icons/Startup.cs +++ b/src/Icons/Startup.cs @@ -1,5 +1,6 @@ using System; using Bit.Icons.Services; +using Microsoft.ApplicationInsights.Extensibility; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; @@ -40,8 +41,17 @@ namespace Bit.Icons services.AddMvc(); } - public void Configure(IApplicationBuilder app, IHostingEnvironment env) + public void Configure( + IApplicationBuilder app, + IHostingEnvironment env, + TelemetryConfiguration telemetry) { + try + { + telemetry.DisableTelemetry = true; + } + catch { } + if(env.IsDevelopment()) { app.UseDeveloperExceptionPage();