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-functions/monitor-functions.md
+38-8Lines changed: 38 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Monitor Azure Functions
3
3
description: Start here to learn how to monitor Azure Functions.
4
-
ms.date: 02/15/2024
4
+
ms.date: 02/22/2024
5
5
ms.custom: horz-monitor
6
6
ms.topic: conceptual
7
7
ms.service: azure-functions
@@ -81,9 +81,15 @@ For a list of available metrics for Azure Functions, see [Azure Functions monito
81
81
- 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)]
82
82
- If your service collects resource logs, add the following include, statement, and service-specific information as appropriate. -->
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
+
84
89
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
+
85
91
<!-- 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. -->
87
93
88
94
<!-- ## Activity log. Required section. Optionally, add service-specific information about your activity log after the include. -->
<!-- Add service-specific information about your imported logs here. -->
95
101
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).
98
105
99
106
<!-- LOGS SECTION END ------------------------------------->
100
107
@@ -112,10 +119,23 @@ The following examples use Azure Monitor metrics to help estimate the cost of ru
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
+
115
128
<!-- ### Sample Kusto queries. Required section. If you have sample Kusto queries for your service, add them after the include. -->
<!-- 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
+
```
119
139
120
140
```Kusto
121
141
FunctionAppLogs
@@ -131,6 +151,16 @@ FunctionAppLogs
131
151
| order by TimeGenerated desc
132
152
```
133
153
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
+
134
164
The following sample query can help you monitor exceptions on a specific functions app's logs:
135
165
136
166
```Kusto
@@ -159,7 +189,8 @@ Fill in the following table with metric and log alerts that would be valuable fo
159
189
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. -->
160
190
161
191
### 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
+
163
194
164
195
| Alert type | Condition | Description |
165
196
|:---|:---|:---|
@@ -182,9 +213,8 @@ The following table lists common and recommended alert rules for Azure Functions
182
213
183
214
For more information about monitoring Azure Functions, see the following articles:
184
215
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.
186
217
-[Monitor Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) gives general details about monitoring Azure resources.
187
218
-[Monitor executions in Azure Functions](functions-monitoring.md) details how to monitor a function app.
188
219
-[How to configure monitoring for Azure Functions](configure-monitoring.md) describes how to configure monitoring.
189
220
-[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