Application Insights for ASP.NET Core

Application Insights lets you monitor your web application for availability, performance and usage. With the feedback you get about the performance and effectiveness of your app in the wild, you can make informed choices about the direction of the design in each development lifecycle.

Example

You'll need a subscription with Microsoft Azure. Sign in with a Microsoft account, which you might have for Windows, XBox Live, or other Microsoft cloud services. Your team might have an organizational subscription to Azure: ask the owner to add you to it using your Microsoft account.

Getting started

  • In Visual Studio Solution Explorer, right-click your project and select Configure Application Insights, or Add > Application Insights. Learn more.
  • If you don't see those menu commands, follow the manual getting Started guide. You may need to do this if your project was created with a version of Visual Studio before 2017.

Using Application Insights

Sign into the Microsoft Azure portal, select All Resources or Application Insights, and then select the resource you created to monitor your app.

In a separate browser window, use your app for a while. You'll see data appearing in the Application Insights charts. (You might have to click Refresh.) There will be only a small amount of data while you're developing, but these charts really come alive when you publish your app and have many users.

The overview page shows key performance charts: server response time, page load time, and counts of failed requests. Click any chart to see more charts and data.

Views in the portal fall into three main categories:

  • Metrics Explorer shows graphs and tables of metrics and counts, such as response times, failure rates, or metrics you create yourself with the API. Filter and segment the data by property values to get a better understanding of your app and its users.
  • Search Explorer lists individual events, such as specific requests, exceptions, log traces, or events you created yourself with the API. Filter and search in the events, and navigate among related events to investigate issues.
  • Analytics lets you run SQL-like queries over your telemetry, and is a powerful analytical and diagnostic tool.

Alerts

  • You automatically get proactive diagnostic alerts that tell you about anomalous changes in failure rates and other metrics.
  • Set up availability tests to test your website continually from locations worldwide, and get emails as soon as any test fails.
  • Set up metric alerts to know if metrics such as response times or exception rates go outside acceptable limits.

Video

Open source

Read and contribute to the code

Next steps