You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/logs/cross-workspace-query.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: This article describes how you can query against resources from mul
4
4
ms.topic: conceptual
5
5
author: bwren
6
6
ms.author: bwren
7
-
ms.date: 04/01/2023
7
+
ms.date: 05/30/2023
8
8
9
9
---
10
10
@@ -24,7 +24,7 @@ There are two methods to query data that's stored in multiple workspaces and app
24
24
25
25
## Cross-resource query limits
26
26
27
-
* The number of Application Insights resources and Log Analytics workspaces that you can include in a single query is limited to 100.
27
+
* The number of Application Insights components and Log Analytics workspaces that you can include in a single query is limited to 100.
28
28
* Cross-resource queries in log alerts are only supported in the current [scheduledQueryRules API](/rest/api/monitor/scheduledqueryrule-2018-04-16/scheduled-query-rules). If you're using the legacy Log Analytics Alerts API, you'll need to [switch to the current API](../alerts/alerts-log-api-switch.md).
29
29
* References to a cross resource, such as another workspace, should be explicit and can't be parameterized. See [Identify workspace resources](#identify-workspace-resources) for examples.
30
30
@@ -33,13 +33,13 @@ To reference another workspace in your query, use the [workspace](../logs/worksp
33
33
34
34
### Identify workspace resources
35
35
36
-
You can identify a workspace in one of several ways:
36
+
You can identify a workspace using one of these IDs:
37
37
38
38
***Workspace ID**: A workspace ID is the unique, immutable, identifier assigned to each workspace represented as a globally unique identifier (GUID).
***Azure Resource ID**: This ID is the Azure-defined unique identity of the workspace. You use the Resource ID when the resource name is ambiguous. For workspaces, the format is */subscriptions/subscriptionId/resourcegroups/resourceGroup/providers/microsoft.OperationalInsights/workspaces/workspaceName*.
42
+
***Azure Resource ID**: This ID is the Azure-defined unique identity of the workspace. For workspaces, the format is */subscriptions/subscriptionId/resourcegroups/resourceGroup/providers/microsoft.OperationalInsights/workspaces/workspaceName*.
43
43
44
44
For example:
45
45
@@ -50,13 +50,13 @@ You can identify a workspace in one of several ways:
50
50
### Identify an application
51
51
The following examples return a summarized count of requests made against an app named *fabrikamapp* in Application Insights.
52
52
53
-
You can identify an application in Application Insights with the `app(Identifier)` expression. The `Identifier` argument specifies the app by using one of the following IDs:
53
+
You can identify an appusing one of these IDs:
54
54
55
55
* **ID**: This ID is the app GUID of the application.
* **Azure Resource ID**: This ID is the Azure-defined unique identity of the app. You use the resource ID when the resource name is ambiguous. The format is */subscriptions/subscriptionId/resourcegroups/resourceGroup/providers/microsoft.OperationalInsights/components/componentName*.
59
+
* **Azure Resource ID**: This ID is the Azure-defined unique identity of the app. The format is */subscriptions/subscriptionId/resourcegroups/resourceGroup/providers/microsoft.OperationalInsights/components/componentName*.
60
60
61
61
For example:
62
62
@@ -67,24 +67,25 @@ You can identify an application in Application Insights with the `app(Identifier
67
67
### Perform a query across multiple resources
68
68
You can query multiple resources from any of your resource instances. These resources can be workspaces and apps combined.
## Use a cross-resource query for multiple resources
82
-
When you use cross-resource queries to correlate data from multiple Log Analytics workspaces and Application Insights resources, the query can become complex and difficult to maintain. You should make use of [functions in Azure Monitor log queries](./functions.md) to separate the query logic from the scoping of the query resources. This method simplifies the query structure. The following example demonstrates how you can monitor multiple Application Insights resources and visualize the count of failed requests by application name.
83
+
When you use cross-resource queries to correlate data from multiple Log Analytics workspaces and Application Insights components, the query can become complex and difficult to maintain. You should make use of [functions in Azure Monitor log queries](./functions.md) to separate the query logic from the scoping of the query resources. This method simplifies the query structure. The following example demonstrates how you can monitor multiple Application Insights components and visualize the count of failed requests by application name.
83
84
84
-
Create a query like the following example that references the scope of Application Insights resources. The `withsource= SourceApp` command adds a column that designates the application name that sent the log. [Save the query as a function](./functions.md#create-a-function) with the alias `applicationsScoping`.
85
+
Create a query like the following example that references the scope of Application Insights components. The `withsource= SourceApp` command adds a column that designates the application name that sent the log. [Save the query as a function](./functions.md#create-a-function) with the alias `applicationsScoping`.
85
86
86
87
```Kusto
87
-
// crossResource function that scopes my Application Insights resources
88
+
// crossResource function that scopes my Application Insights components
0 commit comments