Skip to main content

Distributed Tracing - The Next Step of APM

Gergely Nemeth

Transforming your monolithic application into a microservices-based one is not as easy as many think. When you are breaking a software down into smaller pieces, you're moving the communication to the network layer and the complexity of your architecture is heavily increasing. Other issues arise as well since performance monitoring and finding the root source of an error becomes extremely challenging.

With the rise of microservices, developers need proper Application Performance Management (APM) tools to develop and operate their applications successfully. This blog examines the particular difficulties of monitoring microservices and what APM should be able to do to alleviate the major pain-points of monitoring and debugging them.

Figuring Out What Breaks in a Microservices Application

In a monolithic application, specific code pieces are communicating in the applications memory. It means that when something breaks, the log files will probably be useful to find the cause of an error and you can start debugging right away.

When something goes wrong in a microservices call-chain – called distributed transactions – all of the services participating in that request will throw back an error. It means that you need an excellent logging system, and if you have one, you'll still experience problems since you have to manually correlate the log files to find out what caused the trouble in the first place.

What's the solution to this problem? Distributed Tracing.

For microservices applications, there is a much more sophisticated application performance monitoring method available, called Distributed Tracing.

For distributed tracing, you have to attach a correlation ID to your requests which you can use to track what services are communicating with each other. With these IDs, you can to reverse engineer what happened during an error since all of the services involved in a request will be there for you to see instantly.

Next-gen APM solutions can already attach correlation IDs to requests and can also group the services taking part in a transaction and visualize the exact dataflow on a simple tree-graph. A tool like this enables you to see the distributed call stacks, the root cause of an error, and the dependencies between your microservices.


A distributed tracing timeline shows all of the services taking part in a certain transaction and the source of the error that later propagated back to all of them



There are only a few Distributed Tracing solutions available right now, but you can find open source solutions for Java monitoring and a SaaS solution focusing on Node.js – the technology primarily used for building microservices.

The concept of Distributed Tracing is based on Google’s Dapper whitepaper, which is publicly available here.

Increasing Architecture Complexity and Slow Response Times

As I mentioned above, increasing architecture complexity comes by the definition with microservices.

In a microservices application, the services will usually use a transport layer, like the HTTP protocol, RabbitMQ or Kafka. It will add delays to the internal communication of your application, and when you put services into a call chain, your response times will be higher. A modern APM solution must be prepared for this, and support message queue communication to map out a distributed system. If you have one, you'll be able to figure out what makes it slow.

Companies that build microservices should be able to deal with slow response times by using a distributed tracing APM tool. Correlation IDs let you visualize whole call chains and look for slow response times, whether it's caused by a slow service or the slow network.

If the transaction timeline graph shows that your services are fine, but your network is slow, you can to speed up your application by investigating that. One time, we could figure out that our PaaS provider was using external routing, so every request between our services went outside the public network and back, it reached more than 30 network hops, which caused the bad response time. The next step, in this case, was to choose another without external routing.

If your network times are fine, you have to investigate what slows your services down. It's quite easy if you have an APM with a built-in CPU profiler, or you have some profiling solution enabled. Requesting a CPU profile in the right time (presumably when the response time of a service gets high) will allow you to look for the slow functions and find the location of them. Thankfully, Chrome's Developer Tools support loading and analyzing javascript CPU profiles which solves this problem.

Conclusion

Application performance monitoring solutions have been around for a while, offering the same functionalities for years without major breakthroughs. This has to change. The way how we develop and deploy software is not the same than it was three years ago, and legacy APM tools are not helping as much as they used to. We need solutions that are treating microservices as first class citizens, and the developers who are building them too.

Gergely Nemeth is Co-Founder and CEO of RisingStack.

Hot Topics

The Latest

"AI readiness" has quickly become one of the defining priorities of the modern enterprise. Business decision makers across virtually every industry are working to build roadmaps, solidify strategies, and set expectations around technological investment and adoption. However, at the very same time these leaders are laying their plans, the state of AI continues to change and shift beneath their feet. This raises a fundamental question about the notion of AI readiness: what is it we're actually getting ready for? ...

Genpact and HFS Research recently found that 92% of senior executives at Global 2000 companies believe agentic AI will fundamentally change how work gets done. Yet 85% of them also recognize enterprise debt as a factor limiting their AI value. To move beyond pilots and deliver tangible value, CIOs need to address enterprise debt — the accumulated operational drag from outdated technology, fragmented data, inefficient processes, and talent gaps ...

Proactive is going to become the default expectation, not a nice-to-have. Predicting problems before they happen and fixing them ahead of time will become table stakes, especially for smaller teams and MSPs who cannot afford a big NOC staff ...

The final two installments of the series, Exploring AI Observability, cover predictions from the experts about where AI observability is heading ... In the next few years, tracking your AI won't just be a nice-to-have tool, it will be a survival requirement for businesses ...

Cloud absolutely changed IT for the better. But after more than a decade of using it, companies have also learned something else. Where an application runs matters, and there isn't one environment that makes sense for everything ...

Automation often starts with the people closest to an immediate need. A developer may schedule a script with cron or Amazon EventBridge Scheduler; a business team may adopt an RPA bot, low-code platform, or agent. Many tools stay useful within one domain. Some become consequential across organizational boundaries because other systems and teams depend on them or business outcomes rely on their timing and recovery. Those cases may call for broader coordination ...

The conventional wisdom in our industry says that AI demands a new operating model and specific data tailored for it. I disagree. AI is changing the rules, but not in the way people think ...

Most organizations invest heavily in security tools, policies, and controls. Yet despite these efforts, one reality persists: employees often find ways around them. This isn't always malicious. In many cases, it’s a response to friction, urgency, or misalignment between how work actually happens and how systems are designed to protect it. When employees bypass security, it creates blind spots. Sensitive data may move through unmonitored channels, access controls may be weakened, and risks that security teams intended to mitigate reappear in new forms ...

Enterprise AI projects are often justified with a familiar metric: hours saved. A team automates a manual process, employees spend fewer hours reviewing documents or entering data, and the productivity gain becomes the headline. Time savings matter, but they capture only part of the financial impact AI can have inside an organization ... A more useful way to evaluate enterprise AI is to examine the financial decisions and risks surrounding the workflows it supports ...

We run an internal AI assistant that answers engineering questions in Slack ... Each question kicks off what we call a turn ... We could already audit a single turn after the fact. Every reply carries a short lookup token in its footer, and a slash command pulls up the full receipt for that turn. What we could not do was answer questions about the whole fleet. How long do turns take? What do they cost? Which tools does the agent reach for? Where does the time go inside a single answer? Those are APM questions. So we treated the agent like any other service and instrumented it with OpenTelemetry, end to end. This post covers what we built, the design choices that turned out to matter, and the things that surprised us ...

Distributed Tracing - The Next Step of APM

Gergely Nemeth

Transforming your monolithic application into a microservices-based one is not as easy as many think. When you are breaking a software down into smaller pieces, you're moving the communication to the network layer and the complexity of your architecture is heavily increasing. Other issues arise as well since performance monitoring and finding the root source of an error becomes extremely challenging.

With the rise of microservices, developers need proper Application Performance Management (APM) tools to develop and operate their applications successfully. This blog examines the particular difficulties of monitoring microservices and what APM should be able to do to alleviate the major pain-points of monitoring and debugging them.

Figuring Out What Breaks in a Microservices Application

In a monolithic application, specific code pieces are communicating in the applications memory. It means that when something breaks, the log files will probably be useful to find the cause of an error and you can start debugging right away.

When something goes wrong in a microservices call-chain – called distributed transactions – all of the services participating in that request will throw back an error. It means that you need an excellent logging system, and if you have one, you'll still experience problems since you have to manually correlate the log files to find out what caused the trouble in the first place.

What's the solution to this problem? Distributed Tracing.

For microservices applications, there is a much more sophisticated application performance monitoring method available, called Distributed Tracing.

For distributed tracing, you have to attach a correlation ID to your requests which you can use to track what services are communicating with each other. With these IDs, you can to reverse engineer what happened during an error since all of the services involved in a request will be there for you to see instantly.

Next-gen APM solutions can already attach correlation IDs to requests and can also group the services taking part in a transaction and visualize the exact dataflow on a simple tree-graph. A tool like this enables you to see the distributed call stacks, the root cause of an error, and the dependencies between your microservices.


A distributed tracing timeline shows all of the services taking part in a certain transaction and the source of the error that later propagated back to all of them



There are only a few Distributed Tracing solutions available right now, but you can find open source solutions for Java monitoring and a SaaS solution focusing on Node.js – the technology primarily used for building microservices.

The concept of Distributed Tracing is based on Google’s Dapper whitepaper, which is publicly available here.

Increasing Architecture Complexity and Slow Response Times

As I mentioned above, increasing architecture complexity comes by the definition with microservices.

In a microservices application, the services will usually use a transport layer, like the HTTP protocol, RabbitMQ or Kafka. It will add delays to the internal communication of your application, and when you put services into a call chain, your response times will be higher. A modern APM solution must be prepared for this, and support message queue communication to map out a distributed system. If you have one, you'll be able to figure out what makes it slow.

Companies that build microservices should be able to deal with slow response times by using a distributed tracing APM tool. Correlation IDs let you visualize whole call chains and look for slow response times, whether it's caused by a slow service or the slow network.

If the transaction timeline graph shows that your services are fine, but your network is slow, you can to speed up your application by investigating that. One time, we could figure out that our PaaS provider was using external routing, so every request between our services went outside the public network and back, it reached more than 30 network hops, which caused the bad response time. The next step, in this case, was to choose another without external routing.

If your network times are fine, you have to investigate what slows your services down. It's quite easy if you have an APM with a built-in CPU profiler, or you have some profiling solution enabled. Requesting a CPU profile in the right time (presumably when the response time of a service gets high) will allow you to look for the slow functions and find the location of them. Thankfully, Chrome's Developer Tools support loading and analyzing javascript CPU profiles which solves this problem.

Conclusion

Application performance monitoring solutions have been around for a while, offering the same functionalities for years without major breakthroughs. This has to change. The way how we develop and deploy software is not the same than it was three years ago, and legacy APM tools are not helping as much as they used to. We need solutions that are treating microservices as first class citizens, and the developers who are building them too.

Gergely Nemeth is Co-Founder and CEO of RisingStack.

Hot Topics

The Latest

"AI readiness" has quickly become one of the defining priorities of the modern enterprise. Business decision makers across virtually every industry are working to build roadmaps, solidify strategies, and set expectations around technological investment and adoption. However, at the very same time these leaders are laying their plans, the state of AI continues to change and shift beneath their feet. This raises a fundamental question about the notion of AI readiness: what is it we're actually getting ready for? ...

Genpact and HFS Research recently found that 92% of senior executives at Global 2000 companies believe agentic AI will fundamentally change how work gets done. Yet 85% of them also recognize enterprise debt as a factor limiting their AI value. To move beyond pilots and deliver tangible value, CIOs need to address enterprise debt — the accumulated operational drag from outdated technology, fragmented data, inefficient processes, and talent gaps ...

Proactive is going to become the default expectation, not a nice-to-have. Predicting problems before they happen and fixing them ahead of time will become table stakes, especially for smaller teams and MSPs who cannot afford a big NOC staff ...

The final two installments of the series, Exploring AI Observability, cover predictions from the experts about where AI observability is heading ... In the next few years, tracking your AI won't just be a nice-to-have tool, it will be a survival requirement for businesses ...

Cloud absolutely changed IT for the better. But after more than a decade of using it, companies have also learned something else. Where an application runs matters, and there isn't one environment that makes sense for everything ...

Automation often starts with the people closest to an immediate need. A developer may schedule a script with cron or Amazon EventBridge Scheduler; a business team may adopt an RPA bot, low-code platform, or agent. Many tools stay useful within one domain. Some become consequential across organizational boundaries because other systems and teams depend on them or business outcomes rely on their timing and recovery. Those cases may call for broader coordination ...

The conventional wisdom in our industry says that AI demands a new operating model and specific data tailored for it. I disagree. AI is changing the rules, but not in the way people think ...

Most organizations invest heavily in security tools, policies, and controls. Yet despite these efforts, one reality persists: employees often find ways around them. This isn't always malicious. In many cases, it’s a response to friction, urgency, or misalignment between how work actually happens and how systems are designed to protect it. When employees bypass security, it creates blind spots. Sensitive data may move through unmonitored channels, access controls may be weakened, and risks that security teams intended to mitigate reappear in new forms ...

Enterprise AI projects are often justified with a familiar metric: hours saved. A team automates a manual process, employees spend fewer hours reviewing documents or entering data, and the productivity gain becomes the headline. Time savings matter, but they capture only part of the financial impact AI can have inside an organization ... A more useful way to evaluate enterprise AI is to examine the financial decisions and risks surrounding the workflows it supports ...

We run an internal AI assistant that answers engineering questions in Slack ... Each question kicks off what we call a turn ... We could already audit a single turn after the fact. Every reply carries a short lookup token in its footer, and a slash command pulls up the full receipt for that turn. What we could not do was answer questions about the whole fleet. How long do turns take? What do they cost? Which tools does the agent reach for? Where does the time go inside a single answer? Those are APM questions. So we treated the agent like any other service and instrumented it with OpenTelemetry, end to end. This post covers what we built, the design choices that turned out to matter, and the things that surprised us ...