This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .
Azure Logic Apps (Standard) offers an integration with Azure Monitor Logs to monitor workflow executions. This article shows you how to configure Azure Logic Apps to send system-generated logs to Azure Monitor Logs by using the Diagnostic Settings configuration.
Diagnostic Settings can now be enabled in Azure Logic Apps (Standard) and allows you to emit telemetry to Azure Monitor and other services such as Azure Event Hubs.
To enable Diagnostic Settings:
- Navigate to an Azure Logic Apps (Standard) instance and then select Diagnostic Settings from the left navigation.
- Next, click on Add diagnostic setting.
- Enable Workflow Runtime Logs, followed by selecting your Destination. When using Log Analytics workspace, select a Subscription and a Log Analytics workspace. If you would prefer to send your logs to an alternative destination select the appropriate checkbox and configure the end point as appropriate.
Note: Optionally, you can also select Function Application Logs for some additional telemetry including Host.Startup, Host.Bindings and Host.LanguageWorkerConfig events. To learn more about Azure Function Application Logs, please refer to the following documentation.
- Click Save to enable.
Querying the logs
With our Diagnostics Settings now configured, Azure Logic Apps (Standard) will emit telemetry to Log Analytics.
For the completed events we will see an EndTime published which will allow us to determine the duration between the start event and the complete event.
Including custom properties in your telemetry
Azure Logic Apps includes two capabilities that allow you to inject custom properties into the telemetry that is emitted:
- Custom Tracking ID: This tracking id can be set on most Azure Logic Apps triggers through the use of an expression. This expression can retrieve data from the message payload that was received or can generate unique values.
- Tracked Properties: Can be set on actions throughout your workflow. These properties can leverage logic apps expressions or hard-coded values.
When a workflow contains either Custom Tracking Ids or Tracked Properties, these values will be available in our Log Analytics Workspace.
Select all events for a specific workflow execution
| where RunId == "08585258189921908774209033046CU00"
| where Error != ""
| sort by StartTime desc
Identify actions that have experienced retries
| where RetryHistory != ""
| sort by StartTime desc
For additional information, please see the following YouTube video or refer to our in-product documentation.