Skip to content

Commit 467e3ac

Browse files
authored
Merge pull request #103049 from yossi-y/patch-45
Removed aspect related to deprecated AI connector
2 parents d905508 + 2aff594 commit 467e3ac

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

articles/azure-monitor/log-query/unify-app-resource-data.md

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: bwren
66
ms.workload: na
77
ms.tgt_pltfrm: na
88
ms.topic: conceptual
9-
ms.date: 02/19/2019
9+
ms.date: 02/02/2020
1010

1111
---
1212

@@ -16,12 +16,7 @@ This article describes how to query and view all your Application Insights log d
1616
## Recommended approach to query multiple Application Insights resources
1717
Listing multiple Application Insights resources in a query can be cumbersome and difficult to maintain. Instead, you can leverage function to separate the query logic from the applications scoping.
1818

19-
This example demonstrates how you can monitor multiple Application Insights resources and visualize the count of failed requests by application name. Before you begin, run this query in the workspace that is connected to Application Insights resources to get the list of connected applications:
20-
21-
```
22-
ApplicationInsights
23-
| summarize by ApplicationName
24-
```
19+
This example demonstrates how you can monitor multiple Application Insights resources and visualize the count of failed requests by application name.
2520

2621
Create a function using union operator with the list of applications, then save the query in your workspace as function with the alias *applicationsScoping*.
2722

@@ -57,33 +52,9 @@ The query uses Application Insights schema, although the query is executed in th
5752

5853
![Cross-query results example](media/unify-app-resource-data/app-insights-query-results.png)
5954

60-
## Query across Application Insights resources and workspace data
61-
When you stop the Connector and need to perform queries over a time range that was trimmed by Application Insights data retention (90 days), you need to perform [cross-resource queries](../../azure-monitor/log-query/cross-workspace-query.md) on the workspace and Application Insights resources for an intermediate period. This is until your applications data accumulates per the new Application Insights data retention mentioned above. The query requires some manipulations since the schemas in Application Insights and the workspace are different. See the table later in this section highlighting the schema differences.
62-
6355
>[!NOTE]
6456
>[Cross-resource query](../log-query/cross-workspace-query.md) in log alerts is supported in the new [scheduledQueryRules API](https://docs.microsoft.com/rest/api/monitor/scheduledqueryrules). By default, Azure Monitor uses the [legacy Log Analytics Alert API](../platform/api-alerts.md) for creating new log alert rules from Azure portal, unless you switch from [legacy Log Alerts API](../platform/alerts-log-api-switch.md#process-of-switching-from-legacy-log-alerts-api). After the switch, the new API becomes the default for new alert rules in Azure portal and it lets you create cross-resource query log alerts rules. You can create [cross-resource query](../log-query/cross-workspace-query.md) log alert rules without making the switch by using the [ARM template for scheduledQueryRules API](../platform/alerts-log.md#log-alert-with-cross-resource-query-using-azure-resource-template) – but this alert rule is manageable though [scheduledQueryRules API](https://docs.microsoft.com/rest/api/monitor/scheduledqueryrules) and not from Azure portal.
6557
66-
For example, if the connector stopped working on 2018-11-01, when you query logs across Application Insights resources and applications data in the workspace, your query would be constructed like the following example:
67-
68-
```
69-
applicationsScoping //this brings data from Application Insights resources
70-
| where timestamp between (datetime("2018-11-01") .. now())
71-
| where success == 'False'
72-
| where duration > 1000
73-
| union (
74-
ApplicationInsights //this is Application Insights data in Log Analytics workspace
75-
| where TimeGenerated < (datetime("2018-12-01")
76-
| where RequestSuccess == 'False'
77-
| where RequestDuration > 1000
78-
| extend duration = RequestDuration //align to Application Insights schema
79-
| extend timestamp = TimeGenerated //align to Application Insights schema
80-
| extend name = RequestName //align to Application Insights schema
81-
| extend resultCode = ResponseCode //align to Application Insights schema
82-
| project-away RequestDuration , RequestName , ResponseCode , TimeGenerated
83-
)
84-
| project timestamp , duration , name , resultCode
85-
```
86-
8758
## Application Insights and Log Analytics workspace schema differences
8859
The following table shows the schema differences between Log Analytics and Application Insights.
8960

0 commit comments

Comments
 (0)