aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

How to disable application insights in asp.net core 2.0?

Open Trcx528 opened this issue 9 years ago • 85 comments

I've been attempting to familiarize myself with the asp.net core 2.0 stack. I created a new project and with every request I see output from applications insights in the debug window. As this is just for my own learning I have no desire to use application insights and would rather not have it cluttering the debug window.

Most advice I've found says to just remove the nuget package, however AI is not installed via nuget. The only nuget packages installed are Microsoft.AspNetCore and Microsoft.NETCore.App, neither of which depend on AI. Further more I can not find any reference to AI in my services or appbuilder in my startup. Because the lack of configuration objects and the lack of a nuget package I would expect AI to not be in my project at all, yet it is still logging something.

In short, AI is logging to the debug window, even though it appears not to be part of my project. How can I go about disabling this?

Trcx528 avatar Jun 08 '17 15:06 Trcx528

@BillHiebert

Tratcher avatar Jun 08 '17 21:06 Tratcher

After further investigation this appears to be tied to visual studio as debugging outside of VS (using vscode or just running on the command line) does not show these messages. To help make sure everyone is on the same page, here is the output I observe in the debug window in VS after one HTTP request.

Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 GET http://localhost:62731/  
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 DEBUG http://localhost:62731/  0
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:48.3967075Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET /","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Request starting HTTP/1.1 GET http://localhost:62731/","severityLevel":"Information","properties":{"Method":"GET","Host":"localhost:62731","CategoryName":"Microsoft.AspNetCore.Hosting.Internal.WebHost","Scheme":"http","Protocol":"HTTP/1.1","Path":"/","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:48.3967004Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"DEBUG /","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df49","ai.operation.parentId":"|WC1843-a3501fd0-ac63df49.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Request starting HTTP/1.1 DEBUG http://localhost:62731/  0","severityLevel":"Information","properties":{"ContentLength":"0","Method":"DEBUG","Host":"localhost:62731","CategoryName":"Microsoft.AspNetCore.Hosting.Internal.WebHost","Scheme":"http","Protocol":"HTTP/1.1","Path":"/","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:48.4617268Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"DEBUG /","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df49","ai.operation.parentId":"|WC1843-a3501fd0-ac63df49.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Connection id \"0HL5IC4UQLAF9\" completed keep alive response.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Server.Kestrel","ConnectionId":"0HL5IC4UQLAF9","{OriginalFormat}":"Connection id \"{ConnectionId}\" completed keep alive response.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request finished in 129.444ms 200 
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:48.4703409Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"DEBUG /","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df49","ai.operation.parentId":"|WC1843-a3501fd0-ac63df49.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Request finished in 129.444ms 200","severityLevel":"Information","properties":{"CategoryName":"Microsoft.AspNetCore.Hosting.Internal.WebHost","StatusCode":"200","ElapsedMilliseconds":"129.444","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:48.4763186Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET /","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"The request path / does not match a supported file type","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware","{OriginalFormat}":"The request path {Path} does not match a supported file type","Path":"/","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Request","time":"2017-06-13T13:36:48.3336865Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"DEBUG /","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df49","ai.internal.nodeName":"WC1843"},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"|WC1843-a3501fd0-ac63df49.","name":"DEBUG /","duration":"00:00:00.1564017","success":true,"responseCode":"200","url":"http://localhost:62731/","properties":{"httpMethod":"DEBUG","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:48.5106855Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET /","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"AuthenticationScheme: Cookies was not authenticated.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler","AuthenticationScheme":"Cookies","{OriginalFormat}":"AuthenticationScheme: {AuthenticationScheme} was not authenticated.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:48.6199493Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET /","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Request successfully matched the route with name 'default' and template '{controller=Home}/{action=Index}/{id?}'.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Routing.RouteBase","{OriginalFormat}":"Request successfully matched the route with name '{RouteName}' and template '{RouteTemplate}'.","RouteName":"default","DeveloperMode":"true","AspNetCoreEnvironment":"Development","RouteTemplate":"{controller=Home}/{action=Index}/{id?}"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:48.7240547Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Executing action Iceberg.Controllers.HomeController.Index (Iceberg)","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker","{OriginalFormat}":"Executing action {ActionName}","DeveloperMode":"true","AspNetCoreEnvironment":"Development","ActionName":"Iceberg.Controllers.HomeController.Index (Iceberg)"}}}}
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker:Information: Executing action method Iceberg.Controllers.HomeController.Index (Iceberg) with arguments ((null)) - ModelState is Valid
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:48.7732242Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Executing action method Iceberg.Controllers.HomeController.Index (Iceberg) with arguments ((null)) - ModelState is Valid","severityLevel":"Information","properties":{"CategoryName":"Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker","ValidationState":"Valid","{OriginalFormat}":"Executing action method {ActionName} with arguments ({Arguments}) - ModelState is {ValidationState}","DeveloperMode":"true","AspNetCoreEnvironment":"Development","ActionName":"Iceberg.Controllers.HomeController.Index (Iceberg)"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:48.7771150Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Executed action method Iceberg.Controllers.HomeController.Index (Iceberg), returned result Microsoft.AspNetCore.Mvc.ViewResult.","severityLevel":"Verbose","properties":{"ActionResult":"Microsoft.AspNetCore.Mvc.ViewResult","CategoryName":"Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker","{OriginalFormat}":"Executed action method {ActionName}, returned result {ActionResult}.","DeveloperMode":"true","AspNetCoreEnvironment":"Development","ActionName":"Iceberg.Controllers.HomeController.Index (Iceberg)"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:49.6276940Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Compilation of the generated code for the Razor file at 'C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\Home\\PublicIndex.cshtml' started.","severityLevel":"Verbose","properties":{"FilePath":"C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\Home\\PublicIndex.cshtml","CategoryName":"Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRoslynCompilationService","{OriginalFormat}":"Compilation of the generated code for the Razor file at '{FilePath}' started.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:50.8462465Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Compilation of the generated code for the Razor file at 'C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\Home\\PublicIndex.cshtml' completed in 1212.6438ms.","severityLevel":"Verbose","properties":{"FilePath":"C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\Home\\PublicIndex.cshtml","CategoryName":"Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRoslynCompilationService","ElapsedMilliseconds":"1212.6438","{OriginalFormat}":"Compilation of the generated code for the Razor file at '{FilePath}' completed in {ElapsedMilliseconds}ms.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:50.9127370Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Compilation of the generated code for the Razor file at 'C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\_ViewStart.cshtml' started.","severityLevel":"Verbose","properties":{"FilePath":"C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\_ViewStart.cshtml","CategoryName":"Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRoslynCompilationService","{OriginalFormat}":"Compilation of the generated code for the Razor file at '{FilePath}' started.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:50.9679478Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Compilation of the generated code for the Razor file at 'C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\_ViewStart.cshtml' completed in 52.5297ms.","severityLevel":"Verbose","properties":{"FilePath":"C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\_ViewStart.cshtml","CategoryName":"Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRoslynCompilationService","ElapsedMilliseconds":"52.5297","{OriginalFormat}":"Compilation of the generated code for the Razor file at '{FilePath}' completed in {ElapsedMilliseconds}ms.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:50.9763616Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"The view '/Views/Home/PublicIndex.cshtml' was found.","severityLevel":"Verbose","properties":{"ViewName":"/Views/Home/PublicIndex.cshtml","CategoryName":"Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor","{OriginalFormat}":"The view '{ViewName}' was found.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor:Information: Executing ViewResult, running view at path /Views/Home/PublicIndex.cshtml.
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:50.9830038Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Executing ViewResult, running view at path /Views/Home/PublicIndex.cshtml.","severityLevel":"Information","properties":{"CategoryName":"Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor","{OriginalFormat}":"Executing ViewResult, running view at path {Path}.","Path":"/Views/Home/PublicIndex.cshtml","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:51.0334094Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"View lookup cache miss for view '_Layout' in controller 'Home'.","severityLevel":"Verbose","properties":{"ControllerName":"Home","ViewName":"_Layout","CategoryName":"Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine","{OriginalFormat}":"View lookup cache miss for view '{ViewName}' in controller '{ControllerName}'.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:51.1260378Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Compilation of the generated code for the Razor file at 'C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\Shared\\_Layout.cshtml' started.","severityLevel":"Verbose","properties":{"FilePath":"C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\Shared\\_Layout.cshtml","CategoryName":"Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRoslynCompilationService","{OriginalFormat}":"Compilation of the generated code for the Razor file at '{FilePath}' started.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:51.2825633Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Compilation of the generated code for the Razor file at 'C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\Shared\\_Layout.cshtml' completed in 154.0786ms.","severityLevel":"Verbose","properties":{"FilePath":"C:\\Users\\jpiquette\\Source\\Iceberg\\Views\\Shared\\_Layout.cshtml","CategoryName":"Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRoslynCompilationService","ElapsedMilliseconds":"154.0786","{OriginalFormat}":"Compilation of the generated code for the Razor file at '{FilePath}' completed in {ElapsedMilliseconds}ms.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:51.3027823Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Tag helper component 'Microsoft.AspNetCore.ApplicationInsights.HostingStartup.JavaScriptSnippetTagHelperComponent' initialized.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper","ComponentName":"Microsoft.AspNetCore.ApplicationInsights.HostingStartup.JavaScriptSnippetTagHelperComponent","{OriginalFormat}":"Tag helper component '{ComponentName}' initialized.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:51.3074495Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Tag helper component 'Microsoft.AspNetCore.ApplicationInsights.HostingStartup.JavaScriptSnippetTagHelperComponent' processed.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper","ComponentName":"Microsoft.AspNetCore.ApplicationInsights.HostingStartup.JavaScriptSnippetTagHelperComponent","{OriginalFormat}":"Tag helper component '{ComponentName}' processed.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:51.3281429Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Tag helper component 'Microsoft.AspNetCore.ApplicationInsights.HostingStartup.JavaScriptSnippetTagHelperComponent' initialized.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper","ComponentName":"Microsoft.AspNetCore.ApplicationInsights.HostingStartup.JavaScriptSnippetTagHelperComponent","{OriginalFormat}":"Tag helper component '{ComponentName}' initialized.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:51.3305192Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Tag helper component 'Microsoft.AspNetCore.ApplicationInsights.HostingStartup.JavaScriptSnippetTagHelperComponent' processed.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper","ComponentName":"Microsoft.AspNetCore.ApplicationInsights.HostingStartup.JavaScriptSnippetTagHelperComponent","{OriginalFormat}":"Tag helper component '{ComponentName}' processed.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker:Information: Executed action Iceberg.Controllers.HomeController.Index (Iceberg) in 2641.6233ms
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:51.3708883Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Executed action Iceberg.Controllers.HomeController.Index (Iceberg) in 2641.6233ms","severityLevel":"Information","properties":{"CategoryName":"Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker","ElapsedMilliseconds":"2641.6233","{OriginalFormat}":"Executed action {ActionName} in {ElapsedMilliseconds}ms","DeveloperMode":"true","AspNetCoreEnvironment":"Development","ActionName":"Iceberg.Controllers.HomeController.Index (Iceberg)"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:51.3761765Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Connection id \"0HL5IC4UQLAFA\" completed keep alive response.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Server.Kestrel","ConnectionId":"0HL5IC4UQLAFA","{OriginalFormat}":"Connection id \"{ConnectionId}\" completed keep alive response.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request finished in 3042.2608ms 200 text/html; charset=utf-8
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:36:51.3822633Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.operation.parentId":"|WC1843-a3501fd0-ac63df48.","ai.internal.nodeName":"WC1843"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Request finished in 3042.2608ms 200 text/html; charset=utf-8","severityLevel":"Information","properties":{"CategoryName":"Microsoft.AspNetCore.Hosting.Internal.WebHost","StatusCode":"200","ElapsedMilliseconds":"3042.2608","DeveloperMode":"true","AspNetCoreEnvironment":"Development","ContentType":"text/html; charset=utf-8"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Request","time":"2017-06-13T13:36:48.3336865Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.location.ip":"127.0.0.1","ai.application.ver":"1.0.0.0","ai.operation.name":"GET Home/Index","ai.cloud.roleInstance":"WC1843","ai.operation.id":"WC1843-a3501fd0-ac63df48","ai.internal.nodeName":"WC1843"},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"|WC1843-a3501fd0-ac63df48.","name":"GET Home/Index","duration":"00:00:03.0633276","success":true,"responseCode":"200","url":"http://localhost:62731/","properties":{"httpMethod":"GET","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:38:38.2082350Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.application.ver":"1.0.0.0"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Connection id \"0HL5IC4UQLAF9\" received FIN.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv","ConnectionId":"0HL5IC4UQLAF9","{OriginalFormat}":"Connection id \"{ConnectionId}\" received FIN.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:38:38.2082350Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.application.ver":"1.0.0.0"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Connection id \"0HL5IC4UQLAFA\" received FIN.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv","ConnectionId":"0HL5IC4UQLAFA","{OriginalFormat}":"Connection id \"{ConnectionId}\" received FIN.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:38:38.2340466Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.application.ver":"1.0.0.0"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Connection id \"0HL5IC4UQLAFA\" disconnecting.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Server.Kestrel","ConnectionId":"0HL5IC4UQLAFA","{OriginalFormat}":"Connection id \"{ConnectionId}\" disconnecting.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:38:38.2340466Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.application.ver":"1.0.0.0"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Connection id \"0HL5IC4UQLAF9\" disconnecting.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Server.Kestrel","ConnectionId":"0HL5IC4UQLAF9","{OriginalFormat}":"Connection id \"{ConnectionId}\" disconnecting.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:38:38.2599763Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.application.ver":"1.0.0.0"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Connection id \"0HL5IC4UQLAFA\" stopped.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Server.Kestrel","ConnectionId":"0HL5IC4UQLAFA","{OriginalFormat}":"Connection id \"{ConnectionId}\" stopped.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-06-13T13:38:38.2599763Z","tags":{"ai.internal.sdkVersion":"aspnet5c:2.1.0-beta3","ai.application.ver":"1.0.0.0"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Connection id \"0HL5IC4UQLAF9\" stopped.","severityLevel":"Verbose","properties":{"CategoryName":"Microsoft.AspNetCore.Server.Kestrel","ConnectionId":"0HL5IC4UQLAF9","{OriginalFormat}":"Connection id \"{ConnectionId}\" stopped.","DeveloperMode":"true","AspNetCoreEnvironment":"Development"}}}}

Trcx528 avatar Jun 13 '17 13:06 Trcx528

I concur, it actually hangs my VS whenever I try to debug EF stuff (which logs a ton of stuff).

stgeorge avatar Jun 16 '17 01:06 stgeorge

Same issue here, Doing some memory profiling to make sure I have no leaks, and noticing a lot of stuff being added to an application insights ConcurrentDictionary+Node<String, String>

As far as I knew, I had no insights running at all (no NuGet package added)

Just like Trcx528 I see output into my debug console along the lines of: Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-07-26T22:02:13.2372631Z","tags":{"ai.operation.id":"95b3c749-......

How do we disable it?

simonmurdock avatar Jul 26 '17 22:07 simonmurdock

Same issue, doing anything is taking forever...

redowl3 avatar Jul 27 '17 13:07 redowl3

ApplicationInsights is being dynamically injected. One way to disable this is to set the environment variable ASPNETCORE_preventHostingStartup to "true" in your project launch settings.

See https://github.com/aspnet/Hosting/commit/8377d226f1e6e1a97dabdb6769a845eeccc829ed

Tratcher avatar Jul 27 '17 23:07 Tratcher

@Tratcher can you give more details? From the linked commit, I can't figure out how to modify my launchSettings.json file.

nzain avatar Aug 22 '17 07:08 nzain

Any reason why these are on by default? Are you collecting usage information?

redowl3 avatar Aug 22 '17 08:08 redowl3

Visual Studio 2017 has the "Developer Analytics Tools" extension installed as a strong dependency of asp.net - when you try to uninstall, it will uninstall your web development and dotnet core tools, too (omg). I disabled this extension - no effect, the annyoing debug messages appear by default (arg).

The Microsoft.AspNetCore.All meta nuget package has a dependency on application insights package, so it is installed by default (arg). If you publish your app using a specific RID, the application insights dlls are copied, too.

The complicated, undocumented way of opt-out is correctly given by @Tratcher: in VS, on your web project open Properties > launchSettings.json, find the profile you want to change, and change the environmentVariables. An example from my project looks like this:

      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development",
        "ASPNETCORE_preventHostingStartup": "True"
      },

Alternatively, you can right click your web project > Properties > Debug and add the mystic environment variable there. Grrr. This should be opt-in or simple opt-out!

nzain avatar Aug 22 '17 09:08 nzain

I don't want AI at all.

+1

brockallen avatar Aug 31 '17 13:08 brockallen

I don't want AI at all.

+1

chrispaynter avatar Sep 01 '17 00:09 chrispaynter

I don't want AI at all. +1

mbodm avatar Sep 06 '17 13:09 mbodm

I concur, this is really odd behaviour.

I know it's nice that you are able to just "enable" Application Insights through Azure without having to even reference it in your project, but I think the cost is too high from a framework perspective, if this is how it is done.

MikaelGRA avatar Sep 07 '17 06:09 MikaelGRA

We're going to add some ui to disable AI injection when running in VS. We should have added it in the first place (it was an oversight).

The workaround that @Tratcher suggested works fine but will disable the light up feature completely so it can affect more than insights. For example, the ASP.NET Core IIS Module lights up the IISIntegration package when it launches the process https://github.com/aspnet/AspNetCoreModule/blob/002c8b9bc9a86cd3b4308e62c1f70ea625cbaae2/src/AspNetCore/Inc/serverprocess.h#L18.

davidfowl avatar Sep 07 '17 07:09 davidfowl

Thanks @davidfowl. I'm going to leave the workaround in place for now, but it would be really great if once this new UI is added into VS, the release notes warns us who are using this environment variable that we should probably unset it to avoid the potential light up issues, and use the new UI feature. Thanks again!

chrispaynter avatar Sep 07 '17 08:09 chrispaynter

@grokky1 What exactly are you talking about? It's not on by default. Visual studio sets an environment variable to light the feature up. That's how the system works...

davidfowl avatar Sep 07 '17 08:09 davidfowl

@davidfowl If it's not on by default then why did many of us find it in our logs? That's how we found this thread to begin with...

What logs? In Visual studio or elsewhere?

But you're right I'm not sure how it works, I just want comfort I don't have it running unless I opt-in.

No problem, that's what I'm here for 😝 .

davidfowl avatar Sep 07 '17 08:09 davidfowl

@davidfowl For example the debug log as shown above by @Trcx528 and @simonmurdock. So we wanted to know whether for now, until the changes you mentioned, @nzain's workaround disabled it completely or just hides those logs.

Visual studio output, like I mentioned before. That doesn't just happen when you run any ASP.NET Core application.

davidfowl avatar Sep 07 '17 08:09 davidfowl

Hi @davidfowl - I'm running VS15.4.0 (Preview 1) and App Insights is definitely being collected and attached to a ASP.NET Core app by default? It's not being sent anywhere but it's there.

redowl3 avatar Sep 07 '17 09:09 redowl3

Hi @davidfowl - I'm running VS15.4.0 (Preview 1) and App Insights is definitely being collected and attached to a ASP.NET Core app by default? It's not being sent anywhere but it's there.

That's correct, it lights up in Visual Studio by default and there's no off switch. You can turn off all light up but that's a big hammer. Still, it's a workaround for now.

davidfowl avatar Sep 07 '17 09:09 davidfowl