Application Insights & CodeLens in WPF

Using the following tutorial I was able to easily integrate Application Insights into a WPF application in a matter of minutes…

https://docs.microsoft.com/en-us/azure/application-insights/app-insights-windows-desktop

This simple integration allows me to easily track page views and exceptions, along with a whole host of other useful diagnostics information. The Application Insights Azure portal allows you to explore and examine the tracked statistics, think Google Analytics for desktopĀ applications. The Azure portal allows you to configure email alerts that can contain thresholds for things like the number of exceptions in a particular time period.

By adding the following line to a ProjectGroup element in you primary executable project file

<ApplicationInsightsResourceId>/subscriptions/[subid]/resourceGroups/[rg-name]/providers/microsoft.insights/components/[resource-name]</ApplicationInsightsResourceId>

You will get CodeLensĀ information displayed in your project file…

This gives you a really simple window into the stats that have been collected for your application right within Visual Studio.

I’m now looking into how to track application performance with the Application Insights SDK but things look geared up to make this simple and straightforward.

This sort of insight is invaluable.

Leave a Reply

Your email address will not be published. Required fields are marked *