Distributed Tracing

With Distributed Tracing, you can track transaction traces made from one application to another. This enables you to monitor calls made between applications and narrow down the problem. 


1.What is a trace?

A trace is the execution flow of a transaction, including its method calls, database queries, and exceptions. When a transaction exceeds the specified threshold value, it's captured as a trace. 

2.What is distributed tracing?

Modern applications have evolved from their monolithic ancestry to microservices or distributed systems. Analyzing issues in such environments involves correlating data from multiple services spread across the system, creating an inevitable need for a more sophisticated tracing mechanism to diagnose and troubleshoot issues. Distributed tracing fulfills this need by being able to trace the entire path of a web transaction across application or service boundaries.

3.Prerequisites to enable Distributed Tracing.

Ensure that you have installed APM Insight agents across all your applications that need to be monitored. 

Make sure your agents are updated to the following versions: 

  • Java agent version 4.5.1 
  • .NET agent version 4.5.2
  • Node.js agent version 1.7

Note: Distributed Tracing can be viewed only for applications under the same account. If your applications are spread over various accounts, you cannot have a consolidated view of all your traces across all your accounts. 

4.How Distributed Tracing works.

1. When an application or service makes an API request to another application or service, Site24x7 APM Insight adds an HTTP header containing the metadata required to track the service request. 

2. If Site24x7 APM Insight is enabled in the other corresponding service, it will process the HTTP header and return the tracking information to its caller via the response headers. 

3. If the other service in turn calls another service, the header propagation continues, thus tracing all paths taken by the original application or service across the distributed system. 

Note: Traces are captured only when the request exceeds the defined threshold level in any of the services. 

Note: If your application uses any proxy service, ensure that the corresponding keys, X-Site24x7-Id and X-Site24x7-DT-Data, are added to request and response headers in order for the agent to track the transaction. 

5.Viewing the data.

  1. To view distributed traces, follow the steps below: 
  2. Log in to your Site24x7 account -> APM Insight -> Your applications.
  3. Click on the respective application to view its traces.
  4. Upon clicking the trace, you can see the title, Distributed Tracing. 
  5. This lists the calls made to other applications and the corresponding transactions. 

6.Metrics and inference.

On the Distributed Tracing tab, there are various metrics provided to help you analyze the results of the trace.

  • httpURL.do is the parent transaction from the application Zylker.
  • EmpSite_EmpApp and NodeApp are the other two applications, wherein the parent transaction has made calls to complete its request.
  • dynamodb/createtable, oracle/viewdetails, and customer/add are the corresponding transactions called by the parent transaction, httpURL.do.

The top bar displays detailed metrics like the total response time taken by the transactions (in this case, 8,883ms), partial response time contributed by one of the transactions (3,623ms), memory usage, and more. By clicking Expand Tree View on the right-hand side of the Application Name, you can view the method calls and code blocks that took a significant amount of time to complete this request. 

Under normal circumstances, these transaction traces are viewed separately without context. With Distributed Tracing, you can understand precisely the method calls requested by a transaction from a particular application, and how it has exceeded the threshold level. This simplifies your debugging process.

Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.