diff --git a/src/Admin/Startup.cs b/src/Admin/Startup.cs index 8df7533d11..e9688ab57f 100644 --- a/src/Admin/Startup.cs +++ b/src/Admin/Startup.cs @@ -2,7 +2,6 @@ using Bit.Core; using Bit.Core.Identity; using Bit.Core.Utilities; -using Microsoft.ApplicationInsights.Extensibility; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Routing; @@ -73,17 +72,15 @@ namespace Bit.Admin IHostingEnvironment env, IApplicationLifetime appLifetime, GlobalSettings globalSettings, - ILoggerFactory loggerFactory, - TelemetryConfiguration telemetryConfiguration) + ILoggerFactory loggerFactory) { + loggerFactory.AddSerilog(app, env, appLifetime, globalSettings, (e) => e.Level >= LogEventLevel.Error); + if(globalSettings.SelfHosted) { app.UsePathBase("/admin"); - telemetryConfiguration.DisableTelemetry = true; } - loggerFactory.AddSerilog(app, env, appLifetime, globalSettings, (e) => e.Level >= LogEventLevel.Error); - if(env.IsDevelopment()) { app.UseDeveloperExceptionPage(); diff --git a/util/Server/Startup.cs b/util/Server/Startup.cs index 1e2e787545..0edef59122 100644 --- a/util/Server/Startup.cs +++ b/util/Server/Startup.cs @@ -1,5 +1,4 @@ -using Microsoft.ApplicationInsights.Extensibility; -using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -14,10 +13,8 @@ namespace Bit.Server public void Configure( IApplicationBuilder app, ILoggerFactory loggerFactory, - IConfiguration configuration, - TelemetryConfiguration telemetryConfiguration) + IConfiguration configuration) { - telemetryConfiguration.DisableTelemetry = true; loggerFactory .AddConsole() .AddDebug();