Comments (4)
Can you share the full registration code?
from applicationinsights-dotnet-logging.
var builder = WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseConfiguration(new ConfigurationBuilder().AddCommandLine(args).Build())
.UseShutdownTimeout(TimeSpan.FromSeconds(30))
.UseApplicationInsights()
.ConfigureLogging((hostingContext, logging) =>
{
logging.AddApplicationInsights();
logging.AddFilter<ApplicationInsightsLoggerProvider>("Microsoft", LogLevel.Warning);
logging.AddFilter<ApplicationInsightsLoggerProvider>("System", LogLevel.Warning);
})
.NET Core SDK version: 2.1.403
from applicationinsights-dotnet-logging.
Ah I found the cause. My logging settings are from the ASP.NET Core 1.x days, while 2.0 slightly changed the structure. After fixing that, it works fine.
Another issue misled me is that Visual Studio Appliation Insights panel seems to always show more telemetry, also duplicated telemetry, than it actually sends when running outside.
You can close this. Sorry and thanks for your time. :-)
from applicationinsights-dotnet-logging.
@qrli Debugging from Visual Studio does extra injection - you can set ASPNETCORE_PREVENTHOSTINGSTARTUP = true to disable this. Or if you are in one of the newer VS versions, you can disable this in setting also.
from applicationinsights-dotnet-logging.
Related Issues (20)
- Azure functions V2 throwing internal Application Insights errors HOT 3
- LicenseUrl is deprecated HOT 2
- Document Microsoft.Extensions.Logging.ApplicationInsights logger usage HOT 3
- Can't use filter for ApplicationInsightsLoggerProvider HOT 1
- Throws circular dependency exception when used together with Microsoft.ApplicationInsights.Kubernetes HOT 11
- Does Microsoft. ApplicationInsights. NLogTarget have influence on NLog console and file targets? HOT 9
- InMemoryChannel lock contention HOT 1
- How to use my own TelemetryConfiguration? HOT 3
- Telemetry Client is not flushed on console exit HOT 8
- .net core DI - how to get TelemetryClient HOT 7
- Use custom TelemetryClient HOT 5
- Microsoft.ApplicationInsights.EtwCollector: Please allow .Net 4.5 projects to use Microsoft.ApplicationInsights.EtwCollector HOT 3
- No logs are being captured HOT 1
- Creating new instance of ApplicationInsightsTarget takes ~300ms HOT 4
- Direct Use of TelemetryClient in ASP.NET core best practices? HOT 3
- Azure Function v2 failure HOT 3
- Logging in ASP.NET Core using Application Insights HOT 1
- Microsoft.Extensions.Logging ApplicationInsightsLogger has no implementation for TrackEvent HOT 1
- Logging: This repo is in the process of being migrated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationinsights-dotnet-logging.