VOOZH about

URL: https://thenewstack.io/trace-based-testing-the-next-step-in-observability/

⇱ Trace-Based Testing: The Next Step in Observability - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2022-08-26 09:42:06
Trace-Based Testing: The Next Step in Observability
sponsor-kubeshop,sponsored-post-contributed,
Observability / Software Development

Trace-Based Testing: The Next Step in Observability

Trace-based testing lets you validate dependent relationships between components that you’d only usually see when you push code to production.
Aug 26th, 2022 9:42am by Ken Hamric
👁 Featued image for: Trace-Based Testing: The Next Step in Observability
Feature image via Pixabay.
Kubeshop sponsored this post. Insight Partners is an investor in Kubeshop and TNS.

Observability is one of the key constituents of cloud native technology for software engineers. In fact, the Cloud Native Computing Foundation Charter states that cloud native technologies “enable loosely coupled systems that are resilient, manageable and observable.” But why stop at simply observing system behavior?

Ken Hamric
Ken has been a developer for 35 years and has founded multiple tech startups, including CrossBrowserTesting.com, which was acquired by SmartBear and added to its robust testing portfolio, and recently, Tracetest, an open source project that allows users to create deep integration tests via OpenTelemetry Traces. When not developing, Ken enjoys fishing and spending time on his boat.

Modern microservices and distributed architectures are deeply complex. Hundreds of services can be involved in a single flow. Applications can be written in multiple languages and might be linked to a number of backend data stores. Add to this multiple teams working on different applications, often across continents. In these inherently difficult architectures, uncovering the root of an issue is particularly challenging.

That’s why observability tools that enable distributed tracing have become so incredibly important in recent years — enabling engineers to understand the flow of services and build a picture of system behavior and performance. This information is ideal for integration testing. If the test you are writing has access to a trace telling you exactly what happened and when, you can take a huge chunk of work out of building integration tests by leveraging this data.

Trace-based testing is the next step for observability. It’s a method that enables you to specify exactly what transaction you want to test and what the results should be by observing system behavior. Basically, you can validate dependent relationships between components that you’d usually see when you push code to production. You can proactively test potential issues, rather than scrambling to fix failures.

We are a team of experienced technologists creating development and testing tools, which help teams build cloud native applications easier, better, faster. Backed by the most successful investors in the software industry who see Kubernetes as the foundation for building the software of tomorrow. Insight Partners is an investor in Kubeshop and TNS.
Learn More
The latest from Kubeshop

How Did Trace-Based Testing Get Started?

More than a decade ago in 2010, Google published: “Dapper, a Large-Scale Distributed Systems Tracing Infrastructure.” Modern tracing systems, such as OpenTelemetry Tracing, can trace, pun intended, their origin to Dapper. We recently wrote about the history of OpenTelemetry tracing, if you want further background. Google used the project internally for two years before publishing and reported that “Dapper’s foremost measure of success has been its usefulness to developer and operations teams.

Aside from being incredibly useful, the Google team also realized that the data captured by Dapper in a trace could be used in testing — in fact, the first recorded use of trace-based testing was on Google’s Ads Review service.

“New code release goes through a Dapper trace QA process, which verifies correct system behavior and performance. A number of issues were discovered using this process, both in the Ads Review code itself and in supporting libraries,” it said.

Why Does Trace-Based Testing Matter?

Like the team at Google reported, understanding system behavior is invaluable. It means you can be proactive, rather than reacting constantly to issues that could have been predicted.

Back in 2018, Lightstep’s Ted Young presented the talk, “Trace Driven Development” at KubeCon + CloudNativeCon North America. This is one of the best explanations of the concepts behind trace-based testing and why it’s important. In this brilliant presentation, which I highly recommend watching, Young explained how inefficient testing methods are leading us to some pretty poor-quality code:

“I would argue it’s really important that we start merging our development practices and our monitoring practices. Right now, we develop code, and we have all this tooling that we use to develop that code, and then we throw it over into production. Then we want to see what it’s doing in production, and we use a whole different toolchain to do that, and we don’t test that toolchain in development. We don’t utilize that toolchain in development, and I have found over the years that that means that toolchain has a high variance and quality.”

He poses a straightforward, yet important, question: Why are our development and testing practices divorced from our monitoring practices? If we’re investing time and effort to write and test our code, it should be leveraged in the monitoring process to close the feedback loop and ensure 360-degree observability.

Data-Driven Software Development

Really, what trace-based testing boils down to is data-driven development — using the data that is inherently included in a trace to create tests and define assertions against, thereby verifying proper system operation with repeatable tests.

“We can start applying data science to observing our software in a way that is not just making pretty graphs, but actually writing assertions and creating hypotheses and testing them,” Young said in his presentation.

“We’ve been talking about trace data like trace data is something special, but really trace data is just data. Trace-driven development is really just data-driven development. There’s no reason why you can’t take the style of testing that we usually use to test for a logical execution in our code and write the same kind of test against the aggregate data that we collect in production.”

How to Get Started with Trace-Based Testing

As far back as 2010, Google engineers saw the benefit of basing tests on data provided by a complete, well-instrumented, distributed trace. Up until now, however, this value has been hard to use.

That’s why we’re working on Tracetest, an open source tool to create deep integration tests using OpenTelemetry traces.

Adding an assertion based on the trace

Tracetest unlocks this value, allowing you to use OpenTelemetry trace data to enable both integration and complex end-to-end tests. By relying on the tracing data from your existing tracing system to enable testing, we make integration tests much easier to write. In addition, by building tests based on your traces, we make instrumentation of the trace a core part of the development cycle — not an afterthought, creating a feedback cycle that results in better testing and better observability.

We’re keen to hear your feedback as we continue to build Tracetest, so let us know what you think. You can get started here and chat to us anytime on our Discord channel.

We are a team of experienced technologists creating development and testing tools, which help teams build cloud native applications easier, better, faster. Backed by the most successful investors in the software industry who see Kubernetes as the foundation for building the software of tomorrow. Insight Partners is an investor in Kubeshop and TNS.
Learn More
The latest from Kubeshop
TRENDING STORIES
Ken Hamric has been a developer for 35 years and has founded multiple tech startups, including CrossBrowserTesting.com, which was acquired by SmartBear and added to its robust testing portfolio, and recently, Tracetest, an open source project that allows users to...
Read more from Ken Hamric
Kubeshop sponsored this post. Insight Partners is an investor in Kubeshop and TNS.
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Pragma, Kubeshop.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.