Skip to content

Commit 6fafd43

Browse files
committed
review cx
1 parent f7f09f8 commit 6fafd43

File tree

7 files changed

+44
-12
lines changed

7 files changed

+44
-12
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10874,6 +10874,11 @@
1087410874
"redirect_url": "/azure/azure-health-insights/overview",
1087510875
"redirect_document_id": false
1087610876
},
10877+
{
10878+
"source_path_from_root": "/articles/azure-functions/functions-monitor-log-analytics.md",
10879+
"redirect_url": "/azure/azure-functions/monitor-functions",
10880+
"redirect_document_id": false
10881+
},
1087710882
{
1087810883
"source_path_from_root": "/articles/networking/disaster-recovery-dns-traffic-manager.md",
1087910884
"redirect_url": "/azure/reliability/reliability-traffic-manager",

articles/azure-functions/TOC.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,6 @@
581581
- name: Streaming logs
582582
href: streaming-logs.md
583583
displayName: monitoring
584-
- name: Send logs to Azure Monitor Logs
585-
href: functions-monitor-log-analytics.md
586-
displayName: Azure Monitor, Kusto, Log Analytics, metrics
587584
- name: Authenticate
588585
items:
589586
- name: Configure auth providers

articles/azure-functions/monitor-functions-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Monitoring data reference for Azure Functions
33
description: This article contains important reference material you need when you monitor Azure Functions.
4-
ms.date: 02/15/2024
4+
ms.date: 02/22/2024
55
ms.custom: horz-monitor
66
ms.topic: reference
77
ms.service: azure-functions

articles/azure-functions/monitor-functions.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Monitor Azure Functions
33
description: Start here to learn how to monitor Azure Functions.
4-
ms.date: 02/15/2024
4+
ms.date: 02/22/2024
55
ms.custom: horz-monitor
66
ms.topic: conceptual
77
ms.service: azure-functions
@@ -81,9 +81,15 @@ For a list of available metrics for Azure Functions, see [Azure Functions monito
8181
- If your service doesn't collect resource logs, use the following include [!INCLUDE [horz-monitor-no-resource-logs](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-no-resource-logs.md)]
8282
- If your service collects resource logs, add the following include, statement, and service-specific information as appropriate. -->
8383
[!INCLUDE [horz-monitor-resource-logs](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-resource-logs.md)]
84+
85+
Azure Functions integrates with Azure Monitor Logs to monitor functions. For detailed instructions on how to set up diagnostic settings to configure and route resource logs, see [Create diagnostic settings in Azure Monitor](/azure/azure-monitor/platform/diagnostic-settings).
86+
87+
:::image type="content" source="media/monitor-functions/choose-table.png" alt-text="Screenshot of adding a diagnostic setting for Azure Functions.":::
88+
8489
For the available resource log categories, their associated Log Analytics tables, and the logs schemas for Azure Functions, see [Azure Functions monitoring data reference](monitor-functions-reference.md#resource-logs).
90+
8591
<!-- Resource logs service-specific information. Add service-specific information about your resource logs here.
86-
NOTE: Azure Monitor already has general information on how to configure and route resource logs. See https://learn.microsoft.com/azure/azure-monitor/platform/diagnostic-settings. Ideally, don't repeat that information here. You can provide a single screenshot of the diagnostic settings portal experience if you want. -->
92+
NOTE: Azure Monitor already has general information on how to configure and route resource logs. See https://learn.microsoft.com. Ideally, don't repeat that information here. You can provide a single screenshot of the diagnostic settings portal experience if you want. -->
8793

8894
<!-- ## Activity log. Required section. Optionally, add service-specific information about your activity log after the include. -->
8995
[!INCLUDE [horz-monitor-activity-log](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-activity-log.md)]
@@ -93,8 +99,9 @@ NOTE: Azure Monitor already has general information on how to configure and rout
9399
[!INCLUDE [horz-monitor-imported-logs](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-imported-logs.md)]
94100
<!-- Add service-specific information about your imported logs here. -->
95101

96-
<!-- ## Other logs. Optional section.
97-
If your service has other logs that aren't resource logs or in the activity log, add information that states what they are and what they cover here. You can describe how to route them in a later section. -->
102+
## Other logs
103+
104+
Azure Functions also offers the ability to collect more than Azure Monitor resource logs. For information on how to set up Azure Functions streaming execution logs, see [Enable streaming execution logs in Azure Functions](streaming-logs.md).
98105

99106
<!-- LOGS SECTION END ------------------------------------->
100107

@@ -112,10 +119,23 @@ The following examples use Azure Monitor metrics to help estimate the cost of ru
112119

113120
[!INCLUDE [functions-monitor-metrics-consumption](../../includes/functions-monitor-metrics-consumption.md)]
114121

122+
### Analyze logs for Azure Functions
123+
124+
Azure Functions writes all logs to the **FunctionAppLogs** table under **LogManagement** in the Log Analytics workspace where you send the data. You can use Kusto queries to query the data.
125+
126+
:::image type="content" source="media/monitor-functions/querying.png" alt-text="Screenshot of the Query window for Azure Functions in a Log Analytics workspace.":::
127+
115128
<!-- ### Sample Kusto queries. Required section. If you have sample Kusto queries for your service, add them after the include. -->
116129
[!INCLUDE [horz-monitor-kusto-queries](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-kusto-queries.md)]
117130
<!-- Add sample Kusto queries for your service here. -->
118-
The following sample query can help you monitor all your functions app logs:
131+
The following sample queries can help you monitor all your functions app logs:
132+
133+
```
134+
135+
FunctionAppLogs
136+
| order by TimeGenerated desc
137+
138+
```
119139

120140
```Kusto
121141
FunctionAppLogs
@@ -131,6 +151,16 @@ FunctionAppLogs
131151
| order by TimeGenerated desc
132152
```
133153

154+
The following sample query can help you monitor exceptions on all your functions app logs:
155+
156+
```
157+
158+
FunctionAppLogs
159+
| where ExceptionDetails != ""
160+
| order by TimeGenerated asc
161+
162+
```
163+
134164
The following sample query can help you monitor exceptions on a specific functions app's logs:
135165

136166
```Kusto
@@ -159,7 +189,8 @@ Fill in the following table with metric and log alerts that would be valuable fo
159189
Ask your PMs if you don't know. This information is the BIGGEST request we get in Azure Monitor, so don't avoid it long term. People don't know what to monitor for best results. Be prescriptive. -->
160190

161191
### Azure Functions alert rules
162-
The following table lists common and recommended alert rules for Azure Functions.
192+
The following table lists common and recommended alert rules for Azure Functions. This is just a recommended list. You can set alerts for any metric, log entry, or activity log entry that's listed in the [Monitoring data reference for Azure Functions](monitor-functions-reference.md).
193+
163194

164195
| Alert type | Condition | Description |
165196
|:---|:---|:---|
@@ -182,9 +213,8 @@ The following table lists common and recommended alert rules for Azure Functions
182213

183214
For more information about monitoring Azure Functions, see the following articles:
184215

185-
- [Azure Functions monitoring data reference](monitor-functions-reference.md) provides a reference of the metrics, logs, and other important values created by your function app.
216+
- [Azure Functions monitoring data reference](monitor-functions-reference.md) provides a reference of the metrics, logs, and other important values available for your function app.
186217
- [Monitor Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) gives general details about monitoring Azure resources.
187218
- [Monitor executions in Azure Functions](functions-monitoring.md) details how to monitor a function app.
188219
- [How to configure monitoring for Azure Functions](configure-monitoring.md) describes how to configure monitoring.
189220
- [Analyze Azure Functions telemetry in Application Insights](analyze-telemetry-data.md) describes how to view and query the data being collected from a function app.
190-
- [Monitor Azure Functions with Azure Monitor Logs](functions-monitor-log-analytics.md) shows you how to configure Azure Functions to send logs to Azure Monitor Logs.

0 commit comments

Comments
 (0)