Closed jsodeman closed 2 years ago
In case someone else comes looking for this, for ASP.NET 4.8 or 4.7 it's the same as the example for ASP.NET CORE
.WriteTo.ApplicationInsights(TelemetryConfiguration.Active, TelemetryConverter.Traces)
You can put that in your global.asax or wherever you create your logger. The TelemetryConfiguration information is built into Azure, you just need to configure Application Insights for .Net instrumentation in Azure.
I'm trying to set this sink up in some older .Net 4.7 projects and every example I can find online is for Core. The current Serilog setup in being done in Global.asax and therefore lacks appsetting.json, HostBuilder, services, etc.
I think it would be helpful to at least have a link to an example in the README. (And if anyone can point me in the right direction I would appreciate that too)