How to use the Azure Application Insights tile
The Azure Application Insights tile allows you to query Application Insights for data and display that information on your SquaredUp dashboard.
The ability to render information as a graph is a feature of the Azure portal rather than the App Insights Query language itself. At this time any queries run using the
render statement will still return tabular or scalar data rather than graphs, depending on the tile.
How to configure an Azure Applications Insights tile
You need to have an Azure Applications Insights provider before you can configure an Azure Application Insights tile. If you haven't created a provider yet, see How to add an Azure Application Insights provider.
Add a new tile to a dashboard and choose the Azure tile.
Choose the visualisation for your tile.Scalar
A single value such as a number of customers or incidents.
A table of data, e.g. incidents.
Select your Azure Application Insights provider. If you haven't created a provider yet, see How to add an Azure Application Insights provider.
The tile uses the query language KQL ("Kusto"). KQL is very rich and offers features such as sorting, projection and calculated values, which you can use to control the display of data in your dashboard.
Check out our GitHub Samples repository for sample KQL queries from the community that can be used in Azure tiles.
For more information about writing KQL queries see this external Microsoft article.Query tips and examples for Grids
Example for a performance information request query for a GridCopy
| summarize percentiles(duration, 50, 90, 95) by bin(timestamp, 1h)
Tips for Grid queries
Modify your App Insights query to only return the columns you want to display via
project away. You can hide columns later in the settings, but filtering them directly in the query will improve performance when loading and displaying the tile.Querying multiple (cross-resource) applications
The Azure API allows you to send a query to multiple workspaces (for Log Analytics) or applications (for App Insights) simultaneously using implicit and explicit cross-resource unions. The Log Analytics and the App Insights tile support both mechanisms, with implicit being easier but explicit offering more control over how data is returned.
Regardless of which mechanism you use, you may only query across 10 apps (for App Insights) or 10 workspaces (for Log Analytics) with a single cross-resource query (and therefore a single tile), and the provider's configured app is always used.
Using implicit Unions
When you use implicit unions, you provide a query to the tile and specify up to 9 other additional workspace/app identifiers. The query is automatically sent to the provider's configured workspace and any others you specify, and the output joined together in a single result for further processing. To configure an implicit cross-resource query:
For Azure Log Analytics tiles: In the query panel click add under additional workspaces.
For Azure App Insights tiles: In the query panel click add under additional applications.
Enter an identifier for your workspace/app (using any of the formats given below) and press enter or deselect the text box.
Either repeat the process by clicking add again and adding additional workspaces/apps, or click next and continue to configure the tile.
Using explicit Unions
In contrast to implicit unions, explicit ones are specified directly within your query using the
Unionstatement, and allow you to pull in a specific subset of the data in the other workspaces/apps. For further information check out this Azure blog post on Querying across resources.
For Azure Log Analytics tiles:
The example below shows results from the provider's workspace, along with only security updates from another named
union Update, (workspace("contosoretail").Update | where Classification == "Security Updates" )
| where TimeGenerated >= ago(1h)
| where UpdateState == "Needed"
| summarize dcount(Computer) by Classification
For Azure App Insights tiles:
The example below shows results from the provider's app, along with only GET request exceptions from another named
union exceptions, (app("contosoretail").exceptions | where operation_Name contains "GET" )
| summarize count() by problemId
Identifiers for workspaces
The following methods are supported to identify your workspace/app:
The human readable name of the resource.
Note: If used this must be unique to all Azure subscriptions the provider has access to or the query will fail as ambiguous.
The "full name" of the workspace, in the following format:
For Azure Log Analytics:
For Azure App Insights:
Note: The qualified name may still be ambiguous as subscription names are not unique, but it is extremely unlikely.
The GUID (e.g.
b438b4f6-912a-46d5-9cb1-b44069212ab4), which is completely unique and unambiguous.
For Azure Log Analytics: The GUID is the Workspace ID
For Azure App Insights: The GUID is the Application ID
Azure Resource ID
A string in the following format:
For Azure Log Analytics:
For Azure App Insights:
Note: While the string is unambiguous, it is also extremely long and difficult to work with.
Here you determine the timeframe for the search query.
The default timeframe is 24 hours, which means the tile will not return any entries older than 24 hours.
Take care when using a long timeframe, as this may pull many thousands of entries and significantly impact browser performance.
If your query doesn't specify a timeframe
Set the time range to the fixed time range you want to use.
If your query specifies a timeframe
If you specify a timeframe in the query (e.g.
where timestamp >= ago(2h)), events must satisfy both the timeframe you set here and in the
whereclause in your query.
If you want to control the timeframe using only the query, set the tile timeframe to time range > all.
This tile always ignores the dynamic page timeframe set by users.What is the page timeframe?
The page timeframe is the timeframe setting a dashboard or perspective is currently using. When a user changes the page timeframe, all tiles that use the page timeframe will adapt to the new timeframe. Tiles that don't use the dynamic page timeframe aren't affected and won't change.
Configure the settings for your visualisation:Settings for Scalars
Allows you to set the font size of the value in the tile.
Allows you to add a unit to the value displayed in the Scalar tile. For example, if your value shows a time in milliseconds, you can enter "ms" or if your value shows pageviews, you can enter "pageviews".
Allows you to format the value by using the mustache picker. For example, you can round the value up or down or convert it.Settings for Grids
Grid columns opens the grid designer, where you can show or hide columns, change the order of columns, edit column names or add custom columns.
Allows you to turn the graph items (status blocks or icons and the rows of a grid) into hyperlinks that lead you to more information about each item. For example, when you create a status tile for ServiceNow tickets, you can link each icon or block to the corresponding ticket. A click on the icon or block then opens the ticket in ServiceNow.How to find out the format of the URL
Examples for URLs with dynamic mustache properties for popular APIs
Take a look at the URL for a specific object.
For example, the URL to a specific ticket in your system looks like this:
The URL to another ticket in your system looks like this:
This tells you that the URL to specific tickets is always
https://my-ticket-system.com/ticketID-followed by different values. In this case, the value is the ticket ID.
Find the dynamic property in your return data that contains the value you need. You can use the mustache picker to see all the different properties of your return data. For example, if you need to find the ticket ID, the property could be called
Enter the URL with the dynamic property in the URL field:
The URL for each item is now dynamically generated depending on their
Dynamic mustache properties and values you need to change according to your instance are highlighted in bold.
Azure DevOps projects:
Azure DevOps builds:
Azure Application Insights
Show column headers You can choose between showing or hiding the header for all columns.
Click done to save the tile.
The tile now shows data according to your settings.