Analytics in Application Insights
Analytics is the powerful search and query tool of Application Insights. Analytics is a web tool so no setup is required. If you've already configured Application Insights for one of your apps then you can analyze your app's data by opening Analytics from your app's overview blade.
You can also use the Analytics playground which is a free demo environment with a lot of sample data.
Relation to Azure Monitor logs
Application Insights analytics is based on Azure Data Explorer like Azure Monitor logs and also uses the Kusto query language. It uses the same log analytics portal as Azure Monitor logs, although its data is stored in a separate partition.
You cannot directly access data in a Log Analytics workspace from Application Insights analytics, nor can you directly access application data from log analytics. In order to query both sets of data together, write a query in log analytics and the use the app() expression to access application data.
Query data in Analytics
A typical query starts with a table name followed by a series of operators separated by
For example, let's find out how many requests our app received from different countries/regions, during the last 3 hours:
requests | where timestamp > ago(3h) | summarize count() by client_CountryOrRegion | render piechart
We start with the table name requests and add piped elements as needed. First we define a time filter to review only records from the last 3 hours.
We then count the number of records per country (that data is found in the column client_CountryOrRegion). Finally, we render the results in a pie chart.
The language has many attractive features:
- Filter your raw app telemetry by any fields, including your custom properties and metrics.
- Join multiple tables - correlate requests with page views, dependency calls, exceptions and log traces.
- Powerful statistical aggregations.
- Immediate and powerful visualizations.
- REST API that you can use to run queries programmatically, for example from PowerShell.
The full language reference details every command supported, and updates regularly.
Send feedback about: