Observability of Logic App Runtime

Lakshaykaushik
2 min readDec 1, 2021

Before going into observability of Logic App it is recommended to go through Part 1 of this blog series- https://lakshaykaushik2506.medium.com/running-azure-logic-app-runtime-outside-azure-c280923b3938 to understand what logic app runtime is and how Logic app runtime can be used to develop workflows and run them outside Azure.

As Logic App Runtime runs workflows outside azure on a VM or a container, logs of the workflows are not sent to Azure Log Analytics directly. For sending logs to Azure Log Analytics, there are few components which need to be added while deploying Logic App Runtime on machines.

There are few options which can be used for sending logs of Logic App Runtime to Azure:

  1. fluentd
  2. file beat
  3. Log Analytics Agent

Although logs can be pushed using any of these 3 log exporters, we will be using Log Analytics Agent for this blog post.

Log Analytics agent will be able to send the following metrics/logs for the Logic App Runtime machine:

  1. Custom Logs
  2. CPU/Memory Metrics
  3. Syslogs

For sending logs of Logic App Runtime we need to install oms-agent on our linux machine:

To install oms agent on linux machine, we can run the following command:

wget https://raw.githubusercontent.com/Microsoft/OMS-Agent-for-Linux/master/installer/scripts/onboard_agent.sh && sh onboard_agent.sh -w LOGANALYTICS_WORKSPACE_ID -s LOGANALYTICS_WORKSPACE_KEY

Restart the agent after installation:

/opt/microsoft/omsagent/bin/service_control restart <WORKSPACE_ID>

Start the Logic App Runtime docker container using the docker image we built in the blog https://lakshaykaushik2506.medium.com/running-azure-logic-app-runtime-outside-azure-c280923b3938 :

docker run -e WEBSITE_HOSTNAME=localhost -p 8080:80 logicappdemo|  tee /opt/LogicAppRuntime.log

Configure the oms agent to send logs to Log Analytics Workspace:

<source>type sudo_tailpath /opt/LogicAppRuntime.logpos_file /var/opt/microsoft/omsagent/state/CUSTOM_LOG_BLOB.LogicAppRuntime_CL_7142990a-a17.posread_from_head falserun_interval 60tag oms.blob.CustomLog.CUSTOM_LOG_BLOB.LogicAppRuntime_CL_7142990a-a172-4a6e-a857-fd8babc969a9.*format none</source>

Restart the oms agent by:

/opt/microsoft/omsagent/bin/service_control restart <WORKSPACE_ID>

Wait for sometime and you should be able to see your logs inside the Log Analytics workspace:

We can also see Perf metrics in one of the tables for the Logic App Runtime:

Logs and Perf metrics in the Log Analytics Workspace can be used to plot charts and dashboards and configuring Alerts for the Logic app Runtime workflows.

--

--