Azure Cloud Log Streaming
Monitor your deployed Azure services with log streaming from Azure Log Analytics, integrated directly into the azd app dashboard.
Overview
azd app supports streaming logs from your deployed Azure services alongside local logs in a unified dashboard experience. View logs from Azure Container Apps, App Service, and Functions without switching tools or contexts.
Azure Log Analytics has a typical ingestion delay of 1-5 minutes. Logs are not real-time but refresh automatically based on your configured polling interval (default: 30 seconds).
Supported Azure Services
Configuration
Project-Level Settings
Configure global Log Analytics settings that apply to all services in your azure.yaml file:
logs: analytics: pollingInterval: 30s defaultTimespan: PT15MpollingInterval - How often to query Log Analytics (default: 30s)defaultTimespan - Time range for log queries in ISO 8601 duration format (default: PT15M for 15 minutes)Service-Level Table Selection
Specify which Log Analytics table to query for each service. This overrides automatic table detection:
services: web: host: appservice path: ./src/web logs: analytics: table: AppServiceConsoleLogs
api: host: containerapp path: ./src/api logs: analytics: table: ContainerAppConsoleLogs_CL
Container Apps use custom log tables with _CL suffix. App Service and Functions use standard tables without suffix.
Complete Example
services: web: host: appservice path: ./src/web logs: analytics: table: AppServiceConsoleLogs
api: host: containerapp path: ./src/api logs: analytics: table: ContainerAppConsoleLogs_CL
functions: host: functions path: ./src/functions logs: analytics: table: FunctionAppLogs
logs: analytics: pollingInterval: 30s defaultTimespan: PT15MDashboard Features
Time Range Selection
Choose from preset time ranges to view logs from different time windows:
- 15 minutes - Most recent logs (PT15M)
- 30 minutes - Last half hour (PT30M)
- 6 hours - Extended recent history (PT6H)
- 24 hours - Full day view (PT24H)
Service Filtering
Filter logs to show only specific services, making it easier to focus on one part of your application:
Mode Toggle
Switch between local and Azure logs with a single click. The dashboard remembers your preference and automatically refreshes logs based on the selected mode.
Authentication Requirements
Azure Log Analytics integration requires Azure CLI authentication. Ensure you're logged in before running azd app run:
az loginThe azd app will use your Azure CLI credentials to query Log Analytics workspaces associated with your deployed resources.
Troubleshooting
No Logs Appearing
- Wait for ingestion: Azure Log Analytics has a 1-5 minute delay. New logs take time to appear.
- Check authentication: Run
az account showto verify you're logged in. - Verify deployment: Ensure services are actually deployed to Azure with
azd provisionorazd up. - Check table names: Ensure the correct Log Analytics table is configured for each service type.
Performance Considerations
- Polling interval: Increase
pollingIntervalif queries are slow or rate-limited. - Time range: Shorter time ranges (PT15M) query less data and return faster.
- Service filtering: Use service filters to reduce the amount of log data processed.
Common Errors
Check Azure CLI authentication and ensure your account has Log Analytics Reader permissions on the workspace.
Verify the table name in your azure.yaml matches the actual table in Log Analytics. Container Apps typically use _CL suffix.
Advanced: Custom KQL Queries
For advanced scenarios, you can provide custom KQL (Kusto Query Language) queries in your azure.yaml. This is a yaml-only feature not exposed in the dashboard UI:
services: web: host: appservice path: ./src/web logs: analytics: query: | AppServiceConsoleLogs | where TimeGenerated > ago(15m) | where ResultDescription contains "error" | order by TimeGenerated desc | limit 100Custom KQL queries are for advanced users familiar with Azure Log Analytics. The dashboard time range and service filters will not affect custom queries.
Learn More
- â azure.yaml Reference - Complete configuration reference
- â Logs Tour - Interactive guide to log viewing
- â Azure Log Analytics Documentation - Microsoft official docs