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/container-apps/log-monitoring.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,25 +5,25 @@ services: container-apps
5
5
author: craigshoemaker
6
6
ms.service: azure-container-apps
7
7
ms.topic: how-to
8
-
ms.date: 08/30/2022
8
+
ms.date: 04/17/2025
9
9
ms.author: cshoe
10
10
---
11
11
12
12
# Monitor logs in Azure Container Apps with Log Analytics
13
13
14
-
Azure Container Apps is integrated with Azure Monitor Log Analytics to monitor and analyze your container app's logs. When selected as your log monitoring solution, your Container Apps environment includes a Log Analytics workspace that provides a common place to store the system and application log data from all container apps running in the environment.
14
+
Azure Container Apps is integrated with Azure Monitor Log Analytics to monitor and analyze your container app's logs. When selected as your log monitoring solution, your Container Apps environment includes a Log Analytics workspace that provides a common place to store the system and application log data from all container apps running in the environment.
15
15
16
16
Log entries are accessible by querying Log Analytics tables through the Azure portal or a command shell using the [Azure CLI](/cli/azure/monitor/log-analytics).
17
17
18
-
There are two types of logs for Container Apps.
18
+
Azure Container Apps provides two types of logs to help you monitor and troubleshoot:
19
19
20
-
- Console logs, which are emitted by your app.
21
-
- System logs, which are emitted by the Container Apps service.
20
+
- Console logs - Your application generates these logs.
21
+
- System logs - The Container Apps service generates these logs.
22
22
23
23
24
24
## System Logs
25
25
26
-
The Container Apps service provides system log messages at the container app level. System logs emit the following messages:
26
+
The Container Apps service provides system log messages at the container app level. System logs emit the following messages:
27
27
28
28
| Source | Type | Message |
29
29
|---------|------|---------|
@@ -52,10 +52,10 @@ The system log data is accessible by querying the `ContainerAppSystemLogs_CL` ta
52
52
53
53
## Console Logs
54
54
55
-
Console logs originate from the `stderr` and `stdout` messages from the containers in your container app and Dapr sidecars. You can view console logs by querying the `ContainerAppConsoleLogs_CL` table.
55
+
Console logs originate from the `stderr` and `stdout` messages from the containers in your container app and Dapr sidecars. You can view console logs by querying the `ContainerAppConsoleLogs_CL` table.
56
56
57
57
> [!TIP]
58
-
> Instrumenting your code with well-defined log messages can help you to understand how your code is performing and to debug issues. To learn more about best practices refer to [Design for operations](/azure/architecture/guide/design-principles/design-for-operations).
58
+
> Instrumenting your code with well-defined log messages can help you to understand how your code is performing and to debug issues. To learn more about best practices, refer to [Design for operations](/azure/architecture/guide/design-principles/design-for-operations).
59
59
60
60
The most commonly used Container Apps specific columns in ContainerAppConsoleLogs_CL include:
61
61
@@ -75,13 +75,13 @@ Log Analytics is a tool in the Azure portal that you can use to view and analyze
75
75
76
76
### Azure portal
77
77
78
-
Start Log Analytics from **Logs** in the sidebar menu on your container app page. You can also start Log Analytics from **Monitor>Logs**.
78
+
Start Log Analytics from **Logs** in the sidebar menu on your container app page. You can also start Log Analytics from **Monitor>Logs**.
79
79
80
-
You can query the logs using the tables listed in the **CustomLogs** category **Tables** tab. The tables in this category are the `ContainerAppSystemlogs_CL` and `ContainerAppConsoleLogs_CL` tables.
80
+
You can query the logs using the tables listed in the **CustomLogs** category **Tables** tab. The tables in this category are the `ContainerAppSystemlogs_CL` and `ContainerAppConsoleLogs_CL` tables.
81
81
82
82
:::image type="content" source="media/observability/log-analytics-query-page.png" alt-text="Screenshot of the Log Analytics custom log tables.":::
83
83
84
-
Below is a Kusto query that displays console log entries for the container app named *album-api*.
84
+
The following Kusto query displays console log entries for the container app named *album-api*.
85
85
86
86
```kusto
87
87
ContainerAppConsoleLogs_CL
@@ -90,7 +90,7 @@ ContainerAppConsoleLogs_CL
90
90
| take 100
91
91
```
92
92
93
-
Below is a Kusto query that displays system log entries for the container app named *album-api*.
93
+
The following Kusto query displays system log entries for the container app named *album-api*.
94
94
95
95
```kusto
96
96
ContainerAppSystemLogs_CL
@@ -103,9 +103,9 @@ For more information regarding Log Analytics and log queries, see the [Log Analy
103
103
104
104
### Azure CLI/PowerShell
105
105
106
-
Container Apps logs can be queried using the [Azure CLI](/cli/azure/monitor/log-analytics).
106
+
Container Apps logs can be queried using the [Azure CLI](/cli/azure/monitor/log-analytics).
107
107
108
-
These example Azure CLI queries output a table containing log records for the container app name **album-api**. The table columns are specified by the parameters after the `project` operator. The `$WORKSPACE_CUSTOMER_ID` variable contains the GUID of the Log Analytics workspace.
108
+
These example Azure CLI queries output a table containing log records for the container app name **album-api**. The parameters after the `project` operator specify the table columns. The `$WORKSPACE_CUSTOMER_ID` variable contains the GUID of the Log Analytics workspace.
109
109
110
110
111
111
This example queries the `ContainerAppConsoleLogs_CL` table:
0 commit comments