Quantcast
Channel: Category Name
Viewing all articles
Browse latest Browse all 10804

Application Insights SDK (0.9.0)

$
0
0

What is it?

Our latest and greatest release of the Application Insights SDK.

We offer 5 different types to support the different types of application:

1) Windows Phone (8.0 & 8.1)

2) Windows Store (8.0 & 8.1)

3) Web Applications

4) Java script

5) Logging adapters

 

What will it do for me?

These SDKs allow the user to gather information about their application.  For now, we support trace messages.  Once you instrument your code to send trace messages you will be able to see these messages appear in the Azure portal. 

 

Why do I care?

This allows you to gather usage patterns about how users are using your app, what is failing, and identify areas for improvement

 

How do I use it?

If you are using VS2013 update 3, you can right click on your project file and select "Add Application Insights" to an existing project.  For new projects, there is a check box in the create project dialog box that will automatically add the application insights SDKs for you

If you are not using update 3, you can still add Application Insights via nugget.  Just search for "Application Insights" in form "Manage nuget packages" and add the appropriate package.  It will pull in all of its dependencies for you.

Once you have the nugget installed, you will notice a new file called ApplicationInsights.config.  If you added the SDK manually, you will need to modify the Instrumentation Key in this file with one you create in the Azure portal  (See below to see how to get an instrumentation Key)

Here is some sample code for C#:

 

TelemetryContext telemetryContext = newTelemetryContext();

telemetryContext.TrackTrace("My Trace " + DateTime.Now);

 

How to get an Instrumentation Key (only needed if you manually added the Application SDK manually - not using VS 2013 update 3):

1) Go to portal.azure.com

2) Sign in with your live Id

3) Create a new application Insights resource

5) Once the resource has been created, it will show a new blade.  Click on the Quick Start tile and “Instrument your Website for analytics” End-User Analytics Code.  

6) You should see the End-User Analytics Code blade.  The guid listed in the appInsight.start line is your instrumentation ID

 

Where you will see data:

If you are running your program in debug mode, you will see your traces instantly appear in the website blade in Azure portal

If you are using the VS2013 update 3, you can get to the page by clicking " overview page" under the applicationInsights.config file. 

If not using VS2013 update 3, go back to the portal.azure.com website you create earlier and navigate to the Analytics tile and click on Diagnostic search.  You will see a new blade that should contain all of your trace statement.


Viewing all articles
Browse latest Browse all 10804

Trending Articles