2. 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!
3. 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?
4. Agenda
• Managing access to your AI
• Manually instrument an application (API)
• Automatically instrument an application
• Read the data from Application Insights
• Analytics!
• Questions?
• Documentation
5. 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
6. 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!
7. What can you do with AI?
• Instrument your various apps:
8. What can you do with AI?
• Mobile apps should be instrumented with…
9. 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
12. 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…
13. 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”.
14. 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…
15. […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!
16. How can I add AI to my subscription?
• And finally, the only location available is
“Central US”
• Then… hit “Create” and enjoy…
17. 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.
19. 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…
20. 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”.
21. Managing access to your AI
• When the user logs in he has to look into
YOUR default directory, not his… ! (??????)
22. 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.
25. 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 !
26. Read data from Application Insights
• Demo
– Included properties
– Custom Properties
– Search by session
– Search by property values
27. Analytics
• Not another query language come on MS ???
• We had T-SQL, LinQ, DMX, Xpath… now this…
• Demo