Azure Documentation

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

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.

  1. Open the Logic App resource.
  2. Select Diagnostic settings under Monitoring.
  3. Click Add diagnostic setting.
  4. Give it a name (e.g., LogicAppToLA).
  5. Check Workflow Runtime and Workflow Triggers.
  6. Choose Send to Log Analytics workspace and select your workspace.
  7. Save.
Diagnostic settings UI

2. Sample Queries

Below are common Kusto queries to get you started.

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.

  1. Run a query in Log Analytics.
  2. Click Pin to dashboard above the chart.
  3. Select an existing dashboard or create a new one.
  4. 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

Next Steps