Monitor status, set up diagnostics logging, and turn on alerts for Azure Logic Apps

After you create and run a logic app, you can check its runs history, trigger history, status, and performance. For real-time event monitoring and richer debugging, set up diagnostics logging for your logic app. That way, you can find and view events, like trigger events, run events, and action events. You can also use this diagnostics data with other services, like Azure Storage and Azure Event Hubs.

To get notifications about failures or other possible problems, set up alerts. For example, you can create an alert that detects "when more than five runs fail in an hour." You can also set up monitoring, tracking, and logging programmatically by using Azure Diagnostics event settings and properties.


This article was recently updated to use the term Azure Monitor logs instead of Log Analytics. Log data is still stored in a Log Analytics workspace and is still collected and analyzed by the same Log Analytics service. We are updating the terminology to better reflect the role of logs in Azure Monitor. See Azure Monitor terminology changes for details.

View runs and trigger history for your logic app

  1. To find your logic app in the Azure portal, on the main Azure menu, choose All services. In the search box, type "logic apps", and choose Logic apps.

    Find your logic app

    The Azure portal shows all the logic apps that are associated with your Azure subscription.

  2. Select your logic app, then choose Overview.

    The Azure portal shows the runs history and trigger history for your logic app. For example:

    Logic app runs history and trigger history

    • Runs history shows all the runs for your logic app.
    • Trigger History shows all the trigger activity for your logic app.

    For status descriptions, see Troubleshoot your logic app.


    If you don't find the data that you expect, on the toolbar, choose Refresh.

  3. To view the steps from a specific run, under Runs history, select that run.

    The monitor view shows each step in that run. For example:

    Actions for a specific run

  4. To get more details about the run, choose Run Details. This information summarizes the steps, status, inputs, and outputs for the run.

    Choose "Run Details"

    For example, you can get the run's Correlation ID, which you might need when you use the REST API for Logic Apps.

  5. To get details about a specific step, choose that step. You can now review details like inputs, outputs, and any errors that happened for that step. For example:

    Step details


    All runtime details and events are encrypted within the Logic Apps service. They are decrypted only when a user requests to view that data. You can also control access to these events with Azure Role-Based Access Control (RBAC).

  6. To get details about a specific trigger event, go back to the Overview pane. Under Trigger history, select the trigger event. You can now review details like inputs and outputs, for example:

    Trigger event output details

Turn on diagnostics logging for your logic app

For richer debugging with runtime details and events, you can set up diagnostics logging with Azure Monitor logs. Azure Monitor is a service in Azure that monitors your cloud and on-premises environments to help you maintain their availability and performance.

Before you start, you need to have a Log Analytics workspace. Learn how to create a Log Analytics workspace.

  1. In the Azure portal, find and select your logic app.

  2. On the logic app blade menu, under Monitoring, choose Diagnostics > Diagnostic Settings.

    Go to Monitoring, Diagnostics, Diagnostic Settings

  3. Under Diagnostics settings, choose On.

    Turn on diagnostic logs

  4. Now select the Log Analytics workspace and event category for logging as shown:

    1. Select Send to Log Analytics.
    2. Under Log Analytics, choose Configure.
    3. Under OMS workspaces, select the workspace to use for logging.


      OMS workspaces are now referred to as Log Analytics workspaces.

    4. Under Log, select the WorkflowRuntime category.
    5. Choose the metric interval.
    6. When you're done, choose Save.

    Select Log Analytics workspace and data for logging

Now, you can find events and other data for trigger events, run events, and action events.

Find events and data for your logic app

To find and view events in your logic app, like trigger events, run events, and action events, follow these steps.

  1. In the Azure portal, choose All Services. Search for "log analytics", then choose Log Analytics as shown here:

    Choose "Log Analytics"

  2. Under Log Analytics, find and select your Log Analytics workspace.

    Select your Log Analytics workspace

  3. Under Management, choose Log Search.

    Choose "Log Search"

  4. In the search box, specify a field that you want to find, and press Enter. When you start typing, you see possible matches and operations that you can use.

    For example, to find the top 10 events that happened, enter and select this search query: search Category == "WorkflowRuntime" | limit 10

    Enter search string

    Learn more about how to find data in Azure Monitor logs.

  5. On the results page, in the left bar, choose the timeframe that you want to view. To refine your query by adding a filter, choose +Add.

    Choose timeframe for query results

  6. Under Add Filters, enter the filter name so you can find the filter you want. Select the filter, and choose +Add.

    This example uses the word "status" to find failed events under AzureDiagnostics. Here the filter for status_s is already selected.

    Select filter

  7. In the left bar, select the filter value that you want to use, and choose Apply.

    Select filter value, choose "Apply"

  8. Now return to the query that you're building. Your query is updated with your selected filter and value. Your previous results are now filtered too.

    Return to your query with filtered results

  9. To save your query for future use, choose Save. Learn how to save your query.

Extend how and where you use diagnostic data with other services

Along with Azure Monitor logs, you can extend how you use your logic app's diagnostic data with other Azure services, for example:

You can then get real-time monitoring by using telemetry and analytics from other services, like Azure Stream Analytics and Power BI. For example:

Based on the options that you want set up, make sure that you first create an Azure storage account or create an Azure event hub. Then select the options for where you want to send diagnostic data:

Send data to Azure storage account or event hub


Retention periods apply only when you choose to use a storage account.

Set up alerts for your logic app

To monitor specific metrics or exceeded thresholds for your logic app, set up alerts in Azure. Learn about metrics in Azure.

To set up alerts without Azure Monitor logs, follow these steps. For more advanced alerts criteria and actions, set up Azure Monitor logs too.

  1. On the logic app blade menu, under Monitoring, choose Diagnostics > Alert rules > Add alert as shown here:

    Add an alert for your logic app

  2. On the Add an alert rule blade, create your alert as shown:

    1. Under Resource, select your logic app, if not already selected.
    2. Give a name and description for your alert.
    3. Select a Metric or event that you want to track.
    4. Select a Condition, specify a Threshold for the metric, and select the Period for monitoring this metric.
    5. Select whether to send mail for the alert.
    6. Specify any other email addresses for sending the alert. You can also specify a webhook URL where you want to send the alert.

    For example, this rule sends an alert when five or more runs fail in an hour:

    Create metric alert rule


To run a logic app from an alert, you can include the request trigger in your workflow, which lets you perform tasks like these examples:

Azure Diagnostics event settings and details

Each diagnostic event has details about your logic app and that event, for example, the status, start time, end time, and so on. To programmatically set up monitoring, tracking, and logging, you can use these details with the REST API for Azure Logic Apps and the REST API for Azure Diagnostics.

For example, the ActionCompleted event has the clientTrackingId and trackedProperties properties that you can use for tracking and monitoring:

    "time": "2016-07-09T17:09:54.4773148Z",
    "category": "WorkflowRuntime",
    "level": "Information",
    "operationName": "Microsoft.Logic/workflows/workflowActionCompleted",
    "properties": {
        "$schema": "2016-06-01",
        "startTime": "2016-07-09T17:09:53.4336305Z",
        "endTime": "2016-07-09T17:09:53.5430281Z",
        "status": "Succeeded",
        "code": "OK",
        "resource": {
            "subscriptionId": "<subscription-ID>",
            "resourceGroupName": "MyResourceGroup",
            "workflowId": "cff00d5458f944d5a766f2f9ad142553",
            "workflowName": "MyLogicApp",
            "runId": "08587361146922712057",
            "location": "westus",
            "actionName": "Http"
        "correlation": {
            "actionTrackingId": "e1931543-906d-4d1d-baed-dee72ddf1047",
            "clientTrackingId": "<my-custom-tracking-ID>"
        "trackedProperties": {
            "myTrackedProperty": "<value>"
  • clientTrackingId: If not provided, Azure automatically generates this ID and correlates events across a logic app run, including any nested workflows that are called from the logic app. You can manually specify this ID from a trigger by passing a x-ms-client-tracking-id header with your custom ID value in the trigger request. You can use a request trigger, HTTP trigger, or webhook trigger.

  • trackedProperties: To track inputs or outputs in diagnostics data, you can add tracked properties to actions in your logic app's JSON definition. Tracked properties can track only a single action's inputs and outputs, but you can use the correlation properties of events to correlate across actions in a run.

    To track one or more properties, add the trackedProperties section and the properties you want to the action definition. For example, suppose you want to track data like an "order ID" in your telemetry:

    "myAction": {
      "type": "http",
      "inputs": {
          "uri": "http://uri",
          "headers": {
              "Content-Type": "application/json"
          "body": "@triggerBody()"
      "trackedProperties": {
          "myActionHTTPStatusCode": "@action()['outputs']['statusCode']",
          "myActionHTTPValue": "@action()['outputs']['body']['<content>']",
          "transactionId": "@action()['inputs']['body']['<content>']"

    Here's another example that uses Initialize variable action. The example adds tracked properties from the action's input where the input is an array, not a record.

    "actions": { 
    "Initialize_variable": { 
        "inputs": { 
           "variables": [{ 
              "name": "ConnectorName", 
              "type": "String", 
              "value": "SFTP-SSH" 
        "runAfter": {},
        "trackedProperties": { 
           "Track1": "@action().inputs.variables[0].value"
        "type": "InitializeVariable"

Next steps