Monitor web service health
Application Insights is in preview.
Use Application Insights to diagnose performance problems and exceptions in your web app.
(The steps given here work if you have an ASP.NET web app and you have full access to your web server machine. Go to the alternative instructions if your service runs as a web role in Microsoft Azure or it is a Java web app.)
If you haven't added Application Insights to your web app project, do that now.
(But if you don't want to modify your project, you can set up performance monitoring independently.)
Deploy your app to your server.
- Open Application Insights. You can do that from your web app project.
Go to the PERFORMANCE page and select your application.
If you previously installed Microsoft Monitoring Agent on your web server, you don't need to do anything else. Skip this step and watch for performance data.
To install Microsoft Monitoring Agent on your web server, download it from the PERFORMANCE page.
Copy it to your web server, and run it there with administrative permissions.
But don't download ApplicationInsights.config - you already have a copy of it in your project.
After about 20 minutes, performance counters and metrics will show up. After your app has been in use for some time, a typical chart will look like this:
Make sure to select your app in the drop-down list.
If no data appears, see Troubleshooting.
If your app throws exceptions or crosses performance thresholds, you'll see data in the DIAGNOSTICS pages.
Set up an alert so that you'll know when your app's performance doesn't meet your expectations.
Set the alert details.
You'll hear from us if your app's performance fails to meet your criteria.
Q:Can I adjust the time period that the performance chart covers?
Set the date range.
Drag across the smaller summary chart to zoom in or out.
Q: How do I use Application Insights to tune my app's performance?
- If you see performance events, open the events and investigate the stack traces to see which functions used most time.
- If you don't see many performance events, edit ApplicationInsights.config in the root folder of your website and reduce <PerformanceThreshold> to the point where more requests generate events. Upload ApplicationInsights.config to your web server for the changes to take effect.
Q: How can Application Insights help me diagnose and find bugs?
- Any exceptions that are not caught by your app are reported on the DIAGNOSTICS page. Open the event to investigate the stack trace.
- If you have configured deployment markers you can open the events in Visual Studio, and see the stack trace in the context of the appropriate version of the code - even if you changed the code since the deployment.
- To have the parameter values of a particular function reported in a stack trace, edit ApplicationInsights.config and add the qualified name of the function in <Resources>.
- Compare stack traces to find memory leaks.
- Quickly search logs generated from your favorite diagnostic logging framework (such as TraceListener, Log4Net or NLog).
- Theperformance charts show each deployment, so that you can see how each update affected performance.
Q: How do I get notified about exceptions and drops in performance as soon as they occur?