What is distributed tracing?
Explore IBM's distributed tracing solution Subscribe to AI Topic Updates
Distributed tracing tracking and observing requests through a distributed system
What is distributed tracing?

Distributed tracing is a technique used to track and observe application requests as they move through distributed systems or microservice environments.

Distributed tracing tracks these application requests by collecting and aggregating data on a user’s interactions throughout the transaction process. This technique gives you insight into your application’s health and overall user experience. Developers can then use this collection of traces to troubleshoot areas where there are bugs, errors or high latency.

Smarter artificial intelligence for IT operations (AIOps)

Learn how both APM and ARM can enable faster decisions and resource application.

Related content

Register for the ebook on observability myths

How does distributed tracing work?

Now that you have an idea of what distributed tracing is, let’s dive deep into how it works. Unlike a monolithic application, microservice environments run on distributed backends making it more difficult to track a full request journey. Thankfully distributed tracing can follow a user’s actions each step of the way and monitor how it affects your application from the front end to the back end. 

Distributed tracing starts by instrumenting your microservice architecture. You can use open-source tools such as OpenTelemetry to begin the instrumentation and telemetry collection process. 

Next, developers need to implement code into your services to track trace data and tag unique identifiers to each transaction. The encoded trace context passes from one server to another across the entire application environment. The identifiers that attached themselves to the transaction journey give visibility into your customer experience. 

Distributed tracing tools track each activity or segment after being triggered by an event as it travels through a server. As one span is collected, it then moves to the next one, and so on. These spans typically start with a parent span and move to child spans. 

Your tool will put these actions in order and collect relevant metrics such as custom attributes, timestamps and metadata. Usually, a distributed tracing tool will help you visualize this data in a flame graph or waterfall view format. These graphs help engineers interpret which parts of a distributed system are experiencing bottlenecks, slow-downs or performance issues. 

Lastly, you’ll need to combine your distributed tracing tool with an observability platform to gain end-to-end monitoring of your application. Including a platform like Instana® will help you extract and process data so you can take the right next steps in solving any application error. 

Benefits and challenges of distributed tracing

The complexity of modern architecture has made it difficult for monolithic legacy applications to serve the tools that host them. With this challenge in mind, distributed tracing has become essential in attaining observability in cloud-native environments.

Here are some of the major benefits of distributed tracing:

  • Troubleshoot problems faster: Drastically reduce mean time to resolution (MTTR) and mean time to discovery (MTTD). Engineers can review distributed traces to find the root cause and location of application errors.

  • Boost team collaboration: In a typical microservice environment, specialized teams handle and develop different technologies. This situation can create confusion among teams if they don’t know where the error occurred and who is in charge of solving it. A trace link can help engineering teams visualize the data so they can alert the correct developer to fix the issue. 

  • Flexible integration and implementation: Developers can implement distributed tracing into almost any cloud-native environment. The tools are compliant with a wide range of programming languages and applications. 

Each of these benefits leads to improvements in application performance by giving you insight into how a single request is handled by your server. While there are many benefits to distributed tracing, there are also some challenges to be aware of. 

  • Manual instrumentation: Some distributed tracing platforms require developers to modify their code to start tracing user requests. The manual instrumentation process takes many manhours, leaves your application more vulnerable to bugs, and can conclude in missing traces.

  • Lack of front-end analysis: When purchasing a distributed tracing tool, it’s important to ensure you have end-to-end coverage. Without this ability, you will only have insight into the backend without the end user’s front-end experience. This limitation can make it much more difficult to debug your application. 

  • Sampling: Some distributed tracing tools use arbitrary sampling, which randomly chooses traces to sample and analyze. Because traces are picked at random, and there is no way to know which traces will have issues, it can lead to teams missing major errors that are present. 

Although there are some difficulties that can arise when using a distributed system, the benefits almost always outweigh the cons. Combine your distributed tracing tool with Instana to help troubleshoot these challenges in real-time. 

Distributed tracing vs logging

To understand the difference between distributed tracing and logging, we first need to cover what a log is. A log is a timestamp of an event occurring within an application system. Logging is monitoring these important events identified by logs to highlight unpredictable behaviors within your application. If an error occurs, it triggers an automatic response and alerts your DevOps team. 

One of the major downfalls of logging alone is that it can’t provide a fully comprehensive look into application performance without traces. 

Distributed tracing uses trace IDs to follow transactions through your system with context. This context allows you to find the exact location of where an error occurred in your system. This visibility into your microservice-based system reduces the response time to detection throughout the transaction landscape. Hence, many teams use distributed tracing and logging in tandem with each other to get a full picture of their modern application health.

Distributed tracing tools

Distributed tracing tools usually support instrumentation, data collection and visualization of data into flame graphs. The most popular way to set up distributed tracing solutions is with open-source tools. 

These are some of the most popular open source options available on the market:

  • OpenTelemetry: OpenTelemetry offers a collection of software development kits (SDKs), data collection software, vendor-neutral APIs and tools for instrumentation. It is a combination of OpenCensus and OpenTracing. This popular performance monitoring framework for cloud environments is one of the most popular distributed tracing tools. OTel doesn’t include tools for analysis or visualizing data, but you can send telemetry data to third-party applications to conduct this research.

  • OpenCensus: OpenCensus was created by Google based on its internal tracing system. It was eventually made open source and became available in multi-language libraries. It can collect and transfer data to backend platforms to help with debugging but, unfortunately, lacks an API to embed the software into code. This limitation is one of the main reasons OpenCensus and OpenTracing have been combined together by the Cloud Native Computing Foundation (CNCF) to create OpenTelemetry. 

  • OpenTracing: OpenTracing is a vendor-agnostic API that assists developers in instrumenting code for distributed tracing. This open-source project is available in nine different languages, including Java, Python and Ruby. 

  • Zipkin: Zipkin is another open-source project created by Twitter. This distributed tracing system helps DevOps professionals with collecting important application data and troubleshooting latency issues in different service architectures. You can report data to Zipkin using Apache, Kafka or HTTP.

  • Jaeger: Jaeger is the newest open-source project on this list and was created by Uber and integrates easily with OpenTracing. This tool is highly elastic, making it a great option for request tracing through a microservice environment. Zipkin and Jaeger both assist in the visualization of statistics but have limitations when it comes to sampling data.

While OpenCensus and OpenTracing were popular in the past, we recommend using OpenTelemetry, Zipkin or Jaeger. Use these tools in combination with an APM or observability tool like Instana to get full clarity into what is happening within your application. 

Trace every request across every server with Instana

To understand the interaction between messages passed between your application and its components, you need tracing. With Instana AutoTrace, you’ll never miss any context or call because of our capabilities to capture every request and correlating traces from open source APIs. Instana makes it easy through their Dynamic Graph.

We optimize each trace between your application, service and system architecture to give you full system coverage. To try out Instana with distributive tracing, sign up for our free two-week trial to access our features.

Distributed tracing products
IBM Instana™

Boost functionality and observability in your enterprise APM; improve application performance management and accelerate CI/CD pipelines no matter where applications reside.

Explore IBM Instana

Distributed tracing resources What is observability?

Explore how observability provides deep visibility into modern distributed applications for faster, automated problem identification and resolution.

What is OpenTelemetry?

Learn how developers and SREs can utilize OpenTelemetry to reach business goals through its standardized process of collecting telemetry data and allowing for better understanding of system behaviors.

What is application performance management (APM)?

Predict and prevent performance issues before they impact your business with application performance management.

What is distributed cloud?

Learn how distributed cloud enables a geographically distributed, centrally managed distribution of public cloud services.

What is open-source software?

Explore how open-source software is developed through open collaboration, and how its source code is available for anyone to use, examine, alter and redistribute.

What is site reliability engineering (SRE)?

Automate IT operations tasks, accelerate software delivery, and minimize IT risk with site reliability engineering.

Take the next step

IBM Instana provides real-time observability that everyone and anyone can use. It delivers quick time-to-value while verifying that your observability strategy can keep up with the dynamic complexity of current and future environments. From mobile to mainframe, Instana supports over 250 technologies and growing. 

Explore IBM Instana Book a live demo