Azure

Application Insights for Windows Store Apps in Azure Portal

If you’ve been using Application Insights for a while now you would have noticed that with recent Visual Updates the Application Insights SDK had been updated to use a new version that logs AI data into the new Azure Portal. From this if you use Windows Store Apps you would probably have noticed that if you instrument a Windows Store application with the new SDK that you can’t actually find your data anywhere although you can see it being logged from the Visual Studio Output window and using Fiddler. The good news is that you will soon be able to have a great experience with the new AI SDK for Windows Store apps as you do for your currently for your web applications, the better news is that below you’ll see how to use the new SDK for your Store Apps and see the data in the Azure Portal.

Create a new AI Resource

First off head over to the Azure Portal and create a new Application Insights Resource

f35fed2b-1763-4310-9156-f3ab4ca4fef7

Give it a name and choose a Resource Group, It’s fine that the Application Type is set to ASP.net web application.

e27d1a78-fca4-4e80-8866-19371b2d3666

After the resource has been created you are ready to add AI to your store app in visual studio

Adding AI to your Windows Store App

Open your store app in visual studio and make sure you have the latest AI SDK installed (2.4 at the moment) and no other AI artifacts left in your project. Right click on the store app solution and click on Add Application Insights Telemetry…

536eab4c-404a-471e-90a5-ddce07b1d870

At this point if you haven’t signed in you will be promoted to sign in, click Gain insights into your application now button

e3f6a1f6-fd83-4bb0-b9ff-274a192bdaf8

After you have signed in you will be presented with the Add Application Insights to Project window

48ca09e3-6546-4079-bc42-9df35e3f6a9a

On this window click on Use advanced mode

23218dee-d599-422e-a6e8-130ea8bd631d

which will now ask you for all your AI settings

557bc177-e147-4023-862c-c13adf0ed27d

We’ll get all of these from the portal. Open your AI resource in the portal and click on Properties

024661be-94e6-428d-b301-52ed25d46fd8

This will show you your Subscription ID, Resource Group, Application Insights Resource (name) and Instrumentation Key. Copy these and place them in the window. Once you have filled in all of those fields and clicked Add Application Insights To Project you are ready to run your app and see some data.

35a23e42-f30d-479b-9132-d7a6d74b7a16

For now it’s good enough to see what’s happening in your app and some insight is infinity better than no insight =)

Gordon Beeming

Gordon is a Software Developer in Durban, South Africa working for Derivco. He is also a Visual Studio ALM Ranger and ALM MVP. Hew writes about anything that he feels might be useful to anyone in the community.

Related Articles

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button