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

NLog Target support ConnectionString with isolated TelemetryClient #2897

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Aug 13, 2024

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

Changes

  • Added ConnectionString option for NLog Target with isolated TelemetryClient (instead of modifying global config)
  • Changed NLog Target Flush to use FlushAsync (instead of blocking)

Checklist

  • I ran Unit Tests locally.
  • CHANGELOG.md updated with one line description of the fix, and a link to the original issue if available.

For significant contributions please make sure you have completed the following items:

  • Design discussion issue #
  • Changes in public surface reviewed

The PR will trigger build, unit tests, and functional tests automatically. Please follow these instructions to build and test locally.

Notes for authors:

  • FxCop and other analyzers will fail the build. To see these errors yourself, compile localy using the Release configuration.

@snakefoot snakefoot changed the title NLog Target support ConnectionString for isolated NLog Target support ConnectionString for isolated TelemetryClient Aug 13, 2024
@snakefoot snakefoot changed the title NLog Target support ConnectionString for isolated TelemetryClient NLog Target support ConnectionString with isolated TelemetryClient Aug 13, 2024
@snakefoot
Copy link
Contributor Author

snakefoot commented Aug 13, 2024

@cijothomas + @rajkumar-rangaraj + @TimothyMothra Fork of #2858 where I have changed to use isolated TelemetryConfiguration so not modifying the global config, when using ConnectionString.

I don't mind also fixing log4net-appender if you like. Thus moving away from using InstrumentationKey before it is fully deprecated.

Please review and merge.

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

Successfully merging this pull request may close these issues.

2 participants