Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

How can I remove ApplicationInsights from my app #523

Closed
kinglionsoft opened this issue Sep 4, 2017 · 6 comments
Closed

How can I remove ApplicationInsights from my app #523

kinglionsoft opened this issue Sep 4, 2017 · 6 comments

Comments

@kinglionsoft
Copy link

When I start an Asp .Net Core 2.0 application, ApplicationInsights Logger will be auto added.

Debug: Loaded hosting startup assembly Microsoft.AspNetCore.ApplicationInsights.HostingStartup

How can I remove it?

@vaindil
Copy link

vaindil commented Oct 24, 2017

I have this question as well. My output is full of useless entries that I'm not using like the one below, and they just hide what I'm really trying to see. I do not have AI installed, I don't even have the extension installed in VS, yet they're still being logged to my console.

Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2017-10-24T18:24:35.3816064Z" ...

@cijothomas cijothomas added this to the 2.2-beta3 milestone Nov 2, 2017
@cijothomas
Copy link
Contributor

@vaindil To control the amount of logging Application Insights listens to and converts to ApplicationInsights Traces, you can modify appsettings.json to somelike this..

{
"Logging": {
"IncludeScopes": false,
"Debug": {
"LogLevel": {
"Default": "Trace"
}
},
"Console": {
"LogLevel": {
"Default": "Warning"
}
},
"ApplicationInsights": {
"LogLevel": {
"Default": "None"
}
}
}
}

This will get rid of all Trace messages. (you can configure this in code also)
(ApplicationInsights will still collect/show Requests/Dependencies though).

I agree this may not be ideal, will provide a better answer on how to remove application insights completely soon.

@cijothomas
Copy link
Contributor

Closing this issue here, as there an issue open in aspnet repo to prevent auto-opt-in for application insights.
dotnet/aspnetcore#2051

@cijothomas
Copy link
Contributor

Also - there are workarounds suggested in the above issue.
one of them being:
dotnet/aspnetcore#2051 (comment)

@joalcava
Copy link

Where can be tracked the progress on this? The issue @cijothomas references is also closed.

@cijothomas
Copy link
Contributor

@joalcava dotnet/aspnetcore#2051 (comment) This shows latest VS which include an option to not have application insights. Let me know if this helps you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants