Logic App Management

Posted: February 16, 2023  |  Categories: Azure

Bidone uses the Logic Apps Management Solution to monitor and manage their Logic Apps. This solution provides us a summary of overall health of your Logic Apps, with options to drill into details, to troubleshoot unexpected behavior patterns and resubmit Logic App runs again. Also see Monitor logic apps with Azure Monitor logs – Azure Logic Apps | Microsoft Learn

Setup

Firstly, the telemetry data is collected in Log Analytics workspaces. We have following production workspaces.

There is an oms for each site. As a result of this we can artificially segregate the data. However, the edi-prod-oms collects data from non-site-specific components.

Each oms is configured in our edi-automation pipeline. For example

{
  "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "omsPrefix":
    { 
      "type": "string"
    },
    "env": {
      "type": "string",
      "allowedValues": [
        "dev",
        "qa",
        "uat",
        "prod",
	      "dr"
      ]
    },
    "location": {
      "type": "string",
      "defaultValue": "australiasoutheast"
    },
    "sku": {
      "type": "string",
      "allowedValues": [
        "Standalone",
        "PerNode",
        "PerGB2018"
      ],
      "defaultValue": "PerGB2018",
      "metadata": {
        "description": "Specifies the service tier of the workspace: Standalone, PerNode, Per-GB"
      }
    }
  },
  "variables": {
    "logAnalyticsOMSName": "[concat(parameters('omsPrefix'), 'edi-', parameters('env'), '-oms')]"

  },
  "resources": [
    {
      "type": "Microsoft.OperationalInsights/workspaces",
      "name": "[variables('logAnalyticsOMSName')]",
      "apiVersion": "2017-03-15-preview",
      "location": "[parameters('location')]",
      "properties": {
        "sku": {
          "Name": "[parameters('sku')]"
        },
        "features": {
          "searchVersion": 1
        }
      }
    }
  ]
}

Secondly the Logic App Management preview is configured for each oms in the same pipeline. An example from the devops pipeline is

{
  "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "omsPrefix":
    { 
      "type": "String"
    },
    "env": {
      "type": "string",
      "allowedValues": [
        "dev",
        "qa",
        "uat",
        "prod",
	      "dr"
      ]
    },
    "location": {
      "type": "String",
      "defaultValue": "australiasoutheast"
    }
  },
  "variables": {
    "logicAppsManagementName": "[concat('LogicAppsManagement(', parameters('omsPrefix'), 'edi-', parameters('env'), '-oms)')]",
    "logAnalyticsOMSName": "[concat(parameters('omsPrefix'), 'edi-', parameters('env'), '-oms')]"
  },
  "resources": [
    {
      "type": "Microsoft.OperationsManagement/solutions",
      "name": "[variables('logicAppsManagementName')]",
      "apiVersion": "2015-11-01-preview",
      "location": "[parameters('location')]",
      "plan": {
        "name": "[variables('logicAppsManagementName')]",
        "promotionCode": "",
        "product": "OMSGallery/LogicAppsManagement",
        "publisher": "Microsoft"
      },
      "scale": null,
      "properties": {
        "workspaceResourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', variables('logAnalyticsOMSName'))]"
      },
      "dependsOn": []
    }
  ]
}

Thirdly, every Logic App is configured to emit telemetry data to an oms.

Each Logic App arm template in our devops contains this snippet to set this up. Note the logAnalyticOMSName dynamically setups this up for each logic app.

      "resources": [
        {
          "type": "providers/diagnosticSettings",
          "name": "[concat('Microsoft.Insights/', variables('diagnosticSettingName'))]",
          "dependsOn": [
            "[resourceId('Microsoft.Logic/workflows', variables('LogicAppName'))]"
          ],
          "apiVersion": "2017-05-01-preview",
          "properties": {
            "name": "[variables('diagnosticSettingName')]",
            "workspaceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', variables('logAnalyticOMSName'))]",
            "logs": [
              {
                "category": "WorkflowRuntime",
                "enabled": true,
                "retentionPolicy": {
                  "days": 0,
                  "enabled": false
                }
              }
            ],
            "metrics": [
              {
                "timeGrain": "PT1M",
                "enabled": true,
                "retentionPolicy": {
                  "enabled": false,
                  "days": 0
                }
              }
            ]
          }
        }
      ]

Custom tracking id’s

In addition to this Bidone makes extensive use of custom tracking id’s on every Logic App. The telemetry includes these tracking id. Thus, on every Logic App trigger sets a custom tracking id.

On the rare occasion that a custom tracking id cannot be set on the trigger then one is set on a task.

For order processing logic apps we use the order number. For invoice processing logic app we use the invoice number. In this way we can easily track any message from beginning to end.

This tracking allows us to search and filter the Logic App management.

Searching Logic App Management

Open the Logic App Management blade from the Azure portal.

Filter for the customer and change the search window if the Last 24 hours is not wide enough. Out of the box the longest window is 30 days.

Click on the Logic App name to see the runs.

If there is a long list of runs you can filter by PO Number to find a specific run. Armed with the Run ID you can copy that to the clipboard and then past it into the Logic App blade to see actual the run.

Resubmitting Logic App runs.

Select the runs you want to submit again by ticking the check box on the left. Finally check resubmit button.

Support Use cases

Bidone support uses the Logic App Management for the following.

  • Finding the Run ID to be able to retrieve a copy of the original purchase order submitted by the customer.
  • Finding the Run ID to be able to retrieve a copy of the invoice submitted to the customer.
  • Finding the Run ID to be able to troubleshoot specific Logic App runs.
  • Bulk resubmission of Logic App runs.

Alternative Options to Logic App Management

Logic App Management has been in preview forever ca 5 years and has become part of the furniture at Bidone we use it every day and have come to rely on it. Bidone to date has not explored any other options because this out of the box solution provides all we want.

Some alternatives are

Bidone to date does not use custom Azure Workbooks. The skills to create these do not exist with Bidone.

turbo360

Back to Top