What is Application Insights?
Application Insights is an extensible Application Performance Management (APM) service for web developers on multiple platforms. Use it to monitor your live web application. It will automatically detect performance anomalies. It includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your app. It's designed to help you continuously improve performance and usability. It works for apps on a wide variety of platforms including .NET, Node.js and Java EE, hosted on-premises, hybrid, or any public cloud. It integrates with your DevOps process, and has connection points to a variety of development tools. It can monitor and analyze telemetry from mobile apps by integrating with Visual Studio App Center.
How does Application Insights work?
You install a small instrumentation package in your application, and set up an Application Insights resource in the Microsoft Azure portal. The instrumentation monitors your app and sends telemetry data to the portal. (The application can run anywhere - it doesn't have to be hosted in Azure.)
In addition, you can pull in telemetry from the host environments such as performance counters, Azure diagnostics, or Docker logs. You can also set up web tests that periodically send synthetic requests to your web service.
All these telemetry streams are integrated in the Azure portal, where you can apply powerful analytic and search tools to the raw data.
What's the overhead?
The impact on your app's performance is very small. Tracking calls are non-blocking, and are batched and sent in a separate thread.
What does Application Insights monitor?
Application Insights is aimed at the development team, to help you understand how your app is performing and how it's being used. It monitors:
- Request rates, response times, and failure rates - Find out which pages are most popular, at what times of day, and where your users are. See which pages perform best. If your response times and failure rates go high when there are more requests, then perhaps you have a resourcing problem.
- Dependency rates, response times, and failure rates - Find out whether external services are slowing you down.
- Exceptions - Analyze the aggregated statistics, or pick specific instances and drill into the stack trace and related requests. Both server and browser exceptions are reported.
- Page views and load performance - reported by your users' browsers.
- AJAX calls from web pages - rates, response times, and failure rates.
- User and session counts.
- Performance counters from your Windows or Linux server machines, such as CPU, memory, and network usage.
- Host diagnostics from Docker or Azure.
- Diagnostic trace logs from your app - so that you can correlate trace events with requests.
- Custom events and metrics that you write yourself in the client or server code, to track business events such as items sold or games won.
Where do I see my telemetry?
There are plenty of ways to explore your data. Check out these articles:
|Smart detection and manual alerts
Automatic alerts adapt to your app's normal patterns of telemetry and trigger when there's something outside the usual pattern. You can also set alerts on particular levels of custom or standard metrics.
The components of your app, with key metrics and alerts.
Inspect the execution profiles of sampled requests.
Analyze user segmentation and retention.
|Diagnostic search for instance data
Search and filter events such as requests, exceptions, dependency calls, log traces, and page views.
|Metrics Explorer for aggregated data
Explore, filter, and segment aggregated data such as rates of requests, failures, and exceptions; response times, page load times.
Mash up data from multiple resources and share with others. Great for multi-component applications, and for continuous display in the team room.
|Live Metrics Stream
When you deploy a new build, watch these near-real-time performance indicators to make sure everything works as expected.
Answer tough questions about your app's performance and usage by using this powerful query language.
See performance data in the code. Go to code from stack traces.
Debug snapshots sampled from live operations, with parameter values.
Integrate usage metrics with other business intelligence.
Write code to run queries over your metrics and raw data.
Bulk export of raw data to storage as soon as it arrives.
How do I use Application Insights?
Install Application Insights in your app, set up availability web tests, and:
- Set up a dashboard for your team room to keep an eye on load, responsiveness, and the performance of your dependencies, page loads, and AJAX calls.
- Discover which are the slowest and most failing requests.
- Watch Live Stream when you deploy a new release, to know immediately about any degradation.
When you receive an alert or discover a problem:
- Assess how many users are affected.
- Correlate failures with exceptions, dependency calls, and traces.
- Examine profiler, snapshots, stack dumps, and trace logs.
Build, Measure, Learn
Measure the effectiveness of each new feature that you deploy.
- Plan to measure how customers use new UX or business features.
- Write custom telemetry into your code.
- Base the next development cycle on hard evidence from your telemetry.
Application Insights is one of the many services hosted within Microsoft Azure, and telemetry is sent there for analysis and presentation. So before you do anything else, you'll need a subscription to Microsoft Azure. It's free to sign up, and if you choose the basic pricing plan of Application Insights, there's no charge until your application has grown to have substantial usage. If your organization already has a subscription, they could add your Microsoft account to it.
There are several ways to get started. Begin with whichever works best for you. You can add the others later.
- At run time: instrument your web app on the server. Avoids any update to the code. You need admin access to your server.
- At development time: add Application Insights to your code. Allows you to write custom telemetry and to instrument back-end and desktop apps.
- Instrument your web pages for page view, AJAX, and other client-side telemetry.
- Analyze mobile app usage by integrating with Visual Studio App Center.
- Availability tests - ping your website regularly from our servers.
Get started at runtime with:
Get started at development time with:
Support and feedback
- Questions and Issues:
- Your suggestions:
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.