I have a bunch of services which emit System.Diagnostics.Trace.*
trace messages and when hosted via webapi, I simply include the Microsoft.ApplicationInsights.TraceListener
package and my traces are collected in app insights. However, part of the setup requires a web.config file to tell the trace listener to listen and flush like:
<system.diagnostics>
<sources>
<source name="TraceLogging" switchName="Verbose">
<listeners>
<add name="appinsights" type="Microsoft.ApplicationInsights.TraceListener.ApplicationInsightsTraceListener, Microsoft.ApplicationInsights.TraceListener"/>
</listeners>
</source>
</sources>
From this answer it doesn't seem like I can setup this up via web.confg.
Is there any way to enable the trace listener to send traces to my app insights?