Open
Description
openedon Nov 16, 2022
Currently the Microsoft.ApplicationInsights.NLogTarget only supports an instrumentation key. This limits its functionality such that it can only target App Insights in Azure commercial. Also, instrumentation key only configuration is being deprecated (link).
Can connection string support be added to the configuration section of Microsoft.ApplicationInsights.NLogTarget? Below is the current layout of the config in XML form. Could connectionString be an optional element alongside instrumentationKey?
<extensions>
<add assembly="Microsoft.ApplicationInsights.NLogTarget" />
</extensions>
<targets>
<target xsi:type="ApplicationInsightsTarget" name="aiTarget">
<instrumentationKey>Your_Resource_Key</instrumentationKey> <!-- Only required if not using ApplicationInsights.config -->
<contextproperty name="threadid" layout="${threadid}" /> <!-- Can be repeated with more context -->
</target>
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="aiTarget" />
</rules>
Thank you.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment