Collect and Analyze Logic Apps Data with Azure Log Analytics
Azure Logic Apps generate rich telemetry that can be sent to Azure Monitor Log Analytics for deep insights, troubleshooting, and compliance reporting. This guide walks you through enabling diagnostics, querying data, and best practices.
Prerequisites
- Active Azure subscription
- Logic App already deployed
- Log Analytics workspace created (or existing)
- Contributor or higher role on both the Logic App and the workspace
1. Enable Diagnostic Settings
Navigate to your Logic App in the Azure portal and add a diagnostic setting that streams logs to a Log Analytics workspace.
- Open the Logic App resource.
- Select Diagnostic settings under Monitoring.
- Click Add diagnostic setting.
- Give it a name (e.g.,
LogicAppToLA
). - Check Workflow Runtime and Workflow Triggers.
- Choose Send to Log Analytics workspace and select your workspace.
- Save.

2. Sample Queries
Below are common Kusto queries to get you started.
Table of Contents:
Run count per day
AzureDiagnostics
| where ResourceType == "WORKFLOWS"
| summarize runs = count() by bin(TimeGenerated, 1d)
| render timechart
Failed runs details
AzureDiagnostics
| where ResourceType == "WORKFLOWS"
| where Status_s == "Failed"
| project TimeGenerated, OperationName, CorrelationId, Status_s, Message_s
| order by TimeGenerated desc
| limit 50
Trigger latency breakdown
AzureDiagnostics
| where ResourceType == "WORKFLOWS"
| where OperationName == "TriggerStart"
| summarize avgLatency = avg(toint(DurationMs_s)) by TriggerName_s, bin(TimeGenerated, 1h)
| render columnchart
3. Visualization in Azure Monitor
Pin the above queries to an Azure Dashboard for a real‑time view.
- Run a query in Log Analytics.
- Click Pin to dashboard above the chart.
- Select an existing dashboard or create a new one.
- Arrange tiles as desired.
4. Exporting Data
Use the .export
command to archive logs to Azure Storage or Power BI.
.export to storage
with (includeHeaders = true)
<| AzureDiagnostics
| where ResourceType == "WORKFLOWS"
| project TimeGenerated, CorrelationId, Status_s, Message_s
5. Best Practices
- Enable both Workflow Runtime and Workflow Triggers for comprehensive coverage.
- Set a retention policy in Log Analytics that aligns with compliance needs (e.g., 30‑90 days).
- Use tags on your Logic Apps to filter queries by environment (e.g.,
Environment:sandbox
). - Limit the number of diagnostic settings per Logic App to avoid duplicate data.
- Combine Log Analytics with Azure Monitor alerts for proactive failures.