Distributed tracing and correlation

Over the last few years, Microsoft has built excellent tooling around different technologies. Today, everything is available and achievable through the Azure Portal, which helps manage complex solutions. However, this brings in challenges when it comes to managing the distributed resources. The struggle to keep track of messages or know the flow of messages through these distributed resources is growing day by day.

In most Integration services, Service Bus acts as a message broker to transfer data from a source to a destination.

Azure natively supports distributed tracing using Application Insights agents or SDKs for .NET, .NET Core, Java, Node.js, and JavaScript. When a Service Bus receives a message, it receives the data processed earlier by another system or scope. After receiving the messages from the Service Bus, the subscriber also performs a set of actions on the received data. To correlate these events of publisher and subscriber, there should be a unique property in the message which can be leveraged as a trace property for the End-to-End tracing.

Microsoft Azure Service Bus messaging has defined payload properties that producers and consumers should use to pass such trace context.

Application Insights

Application Insights is a native offering from Azure, which helps to correlate events. These events can occur within the same application process or across several application processes
How Application Insights works is you insert a small package to your application and set up the Application Insights resource within Azure, thus sending the data to Azure to collect information. The business process is monitored, and it sends telemetry data to the Insight portal.

Querying the Distributed Traces

After a comprehensive design of the tracing approach and its implementation, we can now query our distributed traces in a meaningful way.

Once the Service Bus published the message and has logged tracing events, logs in Application Insights can be queried using the Kusto query language.

Application Map from Application Insights

Application Map helps you spot performance bottlenecks or failure hotspots across all components of your distributed application. Each node on the map represents an application component or its dependencies. If your app uses Azure services, you can click Azure diagnostics, such as SQL Database Advisor recommendations.

If you have a service bus pushing messages to a Function App or Logic App, this dependency can be viewed with the help of an Application map. This Application Map helps us understand how a service bus is a connecter to another resource.

End to End tracking in BAM

Bring maximum visibility of your integration solution to functional support teams by defining properties to track business values at run-time. Easily correlate the flow of data within your system. Moreover, it allows you to visualize your business transactions in a graphical representation and detailed information. Furthermore, it also enables the visualization of a specific and more complex business process on how all milestones/transactions are executed in a particular sequence.


Be it Native Azure Tracing features or out-of-box tracking capabilities by Serverless360, it is always to keep track of messages in our business. This Tracking helps us to understand the performance of a business and help to reduce the complexity.

Originally published at Serverless360 site

Comments are closed