introduction à application insights

Post on 15-Apr-2017

324 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Application Insights

This is NOT…

• A presentation on the best practices for AI• A deep dive!• A perfect tool• And I’m not a sales person, just showing AI!

Agenda

• What’s Application Insights?• What can you do with AI? • What’s a subscription to Azure?• How can I add AI to my subscription?• What are the AI pricing tiers?• Where do I start?

Agenda

• Managing access to your AI• Manually instrument an application (API)• Automatically instrument an application• Read the data from Application Insights• Analytics!• Questions?• Documentation

What’s Application Insights

• Application Performance Monitoring tool• It aggregates data that you send from your app• It displays those data in a web portal• Has an API to manually instrument your apps• “Baked in” functionalities (ASP.NET, SQL, Java…)• Integrated with VS2013 or more• API can be used with VS2012+ (Fx 4.5)• Part of the Microsoft Azure offering

What can you do with AI?

• Report usage of features in your application• Report bugs• Availability and performance monitoring • Page views stats• Support Java, mobile or client apps, JavaScript• Dive into the reported data with the “Analytics”

query language!• Auto-magically transfer data to your own SQL

Server database!

What can you do with AI?

• Instrument your various apps:

What can you do with AI?

• Mobile apps should be instrumented with…

What’s a subscription to Azure?

• Requires a Microsoft account to create a sub• TIP : Create a « Billing Account »… why?• A subscription is an application container• Add or remove Azure (apps or service) to subs• A subscription is your portfolio of billable items• A subscription can contain non billable apps• To create a subscription, go to :www.microsoftazure.com

What’s a subscription to Azure?

What’s a subscription to Azure?

What’s a subscription to Azure?

• Eventually you’ll be redirected to : www.portal.azure.com

• This is your azure dashboard or portal• This is where you add apps to your sub…

How can I add AI to my subscription?

• On the Azure Portal, go to “New” then scroll down to “Developer Services” and choose “Application Insights”.

How can I add AI to my subscription?

• Choose a name for your app• Choose an “Application type” like “ASP.NET”• Select the subscription to be used for billing• Select a “Resource Group” for the app…

[…Ressource Groups…]

• …a resource group is just a group of apps or services under Azure. The group helps those components communicate between each others and can be managed together under the group… Chances are you’ll never use that!

How can I add AI to my subscription?

• And finally, the only location available is “Central US”

• Then… hit “Create” and enjoy…

Wait a minute…

• I told you where to bill me (subscription)…• …but I haven’t choose a pricing tier yet…• …MS wouldn’t bill me without letting me

choose a pricing tier, right…. RIGHT???• … of course not… All new AI apps use the FREE

pricing tier… Change it in the properties of your AI app.

What are the AI pricing tiers?

Where do I start?

• Understand the navigation in the Azure portal• Get your Instrumentation Key• Learn the API• Log data to see what can be displayed and how• Customize and save few searches with

predefined filters• If you define custom properties, use enums, max

200 different names…

Managing access to your AI

• You invite people in…• … but it’s a Microsoft Account only club • You choose their role upon inviting them• Let’s do this!

Click Subscriptions -> click your sub -> Settings -> Users ->Add -> Select a Role (contrib) -> Add users -> Search existing users or click Invite to invite a new user.

• This will adds the user to your allowed users in your “Default Directory”.

Managing access to your AI

• When the user logs in he has to look into YOUR default directory, not his… ! (??????)

Manually instrument an App (API)

• Add a reference to : Microsoft.ApplicationInsights.dll• Set your Instrumentation Key• Declare a variable of type TelemetryClient• Use one of the variable’s « Track » method :

– TrackDependency - TrackEvents– TrackException - TrackMetric– TrackPageView - TrackRequest– TrackTrace

• Use the Flush method on the variable to ensure data is sent and not buffered.

Manually instrument an App (API)

• Demo

Automatically instrument an App

• Use VS2013 or VS2015

Automatically instrument an App

• Follow the sign-in instructions and select the right Application Insight ressource (target)

• Validate that the app.config file contains the right Instrumentation key

• Fire your app !

Read data from Application Insights

• Demo– Included properties– Custom Properties– Search by session– Search by property values

Analytics

• Not another query language come on MS ???• We had T-SQL, LinQ, DMX, Xpath… now this…• Demo

Questions?

Documentation

• Alan Cameron Wills Application Insights

top related