Skip to content

Commit d4368ab

Browse files
Merge pull request #298413 from Akhilesh-microsoft/ACA/log_monitoring_freshness
[ACA: log-monitoring_freshness]: Verified the article, reviewed the content, and fixed all editorial issues. Updated ms.date w.r.t freshness pass.
2 parents 16bfbc7 + cace6fd commit d4368ab

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

articles/container-apps/log-monitoring.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,24 @@ services: container-apps
55
author: craigshoemaker
66
ms.service: azure-container-apps
77
ms.topic: how-to
8-
ms.date: 08/30/2022
8+
ms.date: 05/02/2025
99
ms.author: cshoe
1010
---
1111

1212
# Monitor logs in Azure Container Apps with Log Analytics
1313

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.
1515

1616
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).
1717

18-
There are two types of logs for Container Apps.
19-
20-
- Console logs, which are emitted by your app.
21-
- System logs, which are emitted by the Container Apps service.
18+
Azure Container Apps provides two types of logs to help you monitor and troubleshoot:
2219

20+
- **Console logs**: Your application generates these logs.
21+
- **System logs**: The Container Apps service generates these logs.
2322

2423
## System Logs
2524

26-
The Container Apps service provides system log messages at the container app level. System logs emit the following messages:
25+
The Container Apps service provides system log messages at the container app level. System logs emit the following messages:
2726

2827
| Source | Type | Message |
2928
|---------|------|---------|
@@ -52,10 +51,10 @@ The system log data is accessible by querying the `ContainerAppSystemLogs_CL` ta
5251

5352
## Console Logs
5453

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.
54+
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.
5655

5756
> [!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).
57+
> 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).
5958
6059
The most commonly used Container Apps specific columns in ContainerAppConsoleLogs_CL include:
6160

@@ -75,13 +74,13 @@ Log Analytics is a tool in the Azure portal that you can use to view and analyze
7574

7675
### Azure portal
7776

78-
Start Log Analytics from **Logs** in the sidebar menu on your container app page. You can also start Log Analytics from **Monitor>Logs**.
77+
Start Log Analytics from **Logs** in the sidebar menu on your container app page. You can also start Log Analytics from **Monitor>Logs**.
7978

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.
79+
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.
8180

8281
:::image type="content" source="media/observability/log-analytics-query-page.png" alt-text="Screenshot of the Log Analytics custom log tables.":::
8382

84-
Below is a Kusto query that displays console log entries for the container app named *album-api*.
83+
The following Kusto query displays console log entries for the container app named *album-api*.
8584

8685
```kusto
8786
ContainerAppConsoleLogs_CL
@@ -90,7 +89,7 @@ ContainerAppConsoleLogs_CL
9089
| take 100
9190
```
9291

93-
Below is a Kusto query that displays system log entries for the container app named *album-api*.
92+
The following Kusto query displays system log entries for the container app named *album-api*.
9493

9594
```kusto
9695
ContainerAppSystemLogs_CL
@@ -103,9 +102,9 @@ For more information regarding Log Analytics and log queries, see the [Log Analy
103102

104103
### Azure CLI/PowerShell
105104

106-
Container Apps logs can be queried using the [Azure CLI](/cli/azure/monitor/log-analytics).
105+
Container Apps logs can be queried using the [Azure CLI](/cli/azure/monitor/log-analytics).
107106

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.
107+
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.
109108

110109

111110
This example queries the `ContainerAppConsoleLogs_CL` table:

0 commit comments

Comments
 (0)