An Azure service that provides a general-purpose, serverless container platform.
Hello Andrew Cuncannan (Admin),
You're facing an issue where the Azure Container Apps (ACA) environment fails to deliver diagnostic logs or metrics to Log Analytics Workspaces (LAW) or Azure Storage, even though diagnostic settings are correctly configured, multiple destinations have been tested, and synthetic traffic has been generated.
Here are some common reasons why logs might be missing:
- Diagnostic logs are only ingested if container apps emit logs and system logs are generated.
- This may occur when the Log Destination setting of an Azure Container Apps environment is modified, for example, switching between "Don't save logs" and "Azure Log Analytics." The issue specifically affects container apps that were already deployed in the environment prior to the change. These existing apps may stop sending logs as expected. In contrast, newly created container apps that deployed after the Log Destination is set to Log Analytics continue to emit logs correctly, unless the environment’s log destination is changed again.
Additionally, confirm the following settings to validate that the configuration is correctly applied:
1. Verify the Container Apps Environment logging option is correctly configured.
- Go to azure portal.
- Open your Container Apps Environment > monitoring > logging option
- Verify that you selected the logs destination as Azure log analytics and check the configuration
- Double-check diagnostic settings exist and are correctly set at the Container Apps Environment level for:
- Logs: ContainerAppConsoleLogs, ContainerAppSystemLogs
- Metrics: AllMetrics
- Run Log Analytics queries for your container app across the correct workspace using:
- ContainerAppConsoleLogs_CL :
ContainerAppConsoleLogs_CL
| where ContainerAppName_s == "<Your App name>"
- ContainerAppSystemLogs_CL
ContainerAppSystemLogs_CL
| where ContainerAppName_s == "<Your App name>"
- AzureMetrics
AzureMetrics | where ResourceId contains
/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.App/managedEnvironments/<environment-name> | order by TimeGenerated desc
Check these queries and see if you can see any of the logs for your container app
Please confirm if this is helpful and please let us know if you need further assistance.