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.
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, 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.