Application Insights now supports collecting telemetry from Windows Phone and Windows Store applications and lets you visualize it in the Azure Preview portal. You can get insights about your users and what they are doing with your application, as well as diagnose and fix your app crashes. When you add Application Insights to your project, a rich set of data including users, sessions, page views, crashes is collected automatically. In addition, there is an API for you to send custom events, metrics, and exceptions. Let us do a quick walkthrough of the experience. You can also read the getting started doc for more details.
1. Add Application Insights to your project
Open your Windows Phone or Windows Store project using Visual Studio 2013 (Update 3 or higher). Select ‘Add Application Insights telemetry’.
This prompts you to sign-in to your Azure subscription. If you do not have one already, you’ll need to create either a free trial or a pay-as-you-go Azure subscription. Please note that if you get a pay-as-you-go subscription and you use only Application Insights, you won’t be charged while it is in preview (pricing details will be announced in future). Once you sign in, click on ‘Add Application Insights to Project’. That’s it, the SDK will be added to your project.
2. Run your application
Run your application with F5 on an emulator or a device. Application Insights automatically collects telemetry about sessions, users, page views, and crashes. You’ll see a notification in Visual Studio that says your telemetry is collected and sent successfully.
3. View your telemetry in Application Insights portal
You can either click on the link provided in the notification or login to https://portal.azure.com Go to Browse -> Application Insights and select the application you just created.
You should start seeing telemetry generated from your application in the portal right away.
4. Analyze insights about your app usage and crashes
Great, you saw telemetry working, now you want to analyze it. The metrics displayed in the Overview page are some of the most important metrics for your application. You can view additional metrics by clicking on the graphs. This takes you to Metrics Explorer, where you can add metrics, segment by properties, or drill through details for individual items. As an example, the total number of sessions are displayed in the Overview page. Clicking on the graph provides additional details about sessions such as average session duration, time between sessions, session distribution by application version, region and device model.
In order to analyze your application crashes, click on ‘Diagnostic Search’ on the Overview page and filter by exceptions. You can select on a specific instance of the crash to get details including the stack trace and other properties.
5. Send custom events using the API
Now that you have got the basic telemetry setup, it is time to get additional insights. Custom events help you track your user behavior and usage of specific features/scenarios in your app. You can add custom events, as well as custom exceptions and page views using the API. Learn more about the telemetry API.
Also note that the other features of Application Insights such as Continuous data export and alerts are supported for device applications as well.
This is a starting set of reports for device apps and we’ll add more in the future. We are always looking for your feedback to improve the experience. If you like or dislike something, please let us know via any of our channels: Comments on this blog post, Uservoice (new feature requests), forum (discussion and support), and Connect (to report bugs).