SplitOn client tracking Id in logic apps

|  Posted: October 1, 2018  |  Categories: Atomic Scope

In September update, logic Apps team brought a feature to specify tracking ids for logic apps with a SplitOn trigger. I was looking for further information and could not find much on the web. Thought of blogging it myself after testing it out with a sample scenario.

What is SplitOn Trigger property

When you configure a logic app trigger with SplitOn property, a separate instance of the logic app is created for each array item in the input message. For example, say you are receiving orders in a JSON batch which contain an array of orders as shown below.

If you want to generate a separate instance of the logic app and process individual orders parallelly, you will have to configure SplitOn property of the trigger in code view.

 In run history, you can see two executions with the same identifier as below.

SplitOn property can also be used for XML messages as well.  You need to specify the XPath of a repeating node in an XML.

Client Tracking id for each instance.

Until the September update, the client tracking id which correlates all the action events was same for all instances of the logic app generated by SplitOn. But now on you will be able to specify different tracking id for each of the instances.  This can be achieved from the trigger settings as shown below.

Once you specify the Split-On tracking id in settings, The diagnostic logs will have different tracking id for each of these instances. I am using logic apps management pack in log analytics.

The tracking id correlates all the actions in a logic app run. Behind the scene, trackingid is stored in a field called  correlation_client_trackingid.

Summary

It is good to see separate tracking id for each of the logic app instances. However, I am not yet sure how we can relate these back to the original initiating request. We still have a tracking id property for initiating a request in settings, but I could not get this value in diagnostic logs. I yet to explore this further. I will update this post when I have some answer.

You can also explore Atomic Scope which helps you to correlate functional flows involved in Azure integration scenarios involving Azure logic apps, Azure functions, Service Bus Queues.

Author: Srinivasa Mahendrakar

Srinivasa Mahendrakar is a cloud and integration consultant with more than 13 years of experience in the integration space. He is a Director of product at BizTalk360.