Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for connection string to Microsoft.ApplicationInsights.NLogTarget #2714

Open
ghawkescs opened this issue Nov 16, 2022 · 2 comments

Comments

@ghawkescs
Copy link

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.

saidi-adot added a commit to saidi-adot/ApplicationInsights-dotnet that referenced this issue Mar 10, 2023
Add support for connection string to Microsoft.ApplicationInsights.NLogTarget microsoft#2714
@saidi-adot saidi-adot mentioned this issue Mar 10, 2023
4 tasks
@github-actions
Copy link

This issue is stale because it has been open 300 days with no activity. Remove stale label or this will be closed in 7 days. Commenting will instruct the bot to automatically remove the label.

@github-actions github-actions bot added the stale label Sep 13, 2023
@snakefoot
Copy link
Contributor

Resolved by #2714

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

No branches or pull requests

2 participants