Instana has been leading the Application Performance Monitoring (APM) industry with our automated distributed tracing technology, AutoTrace™. With AutoTrace, Instana has eliminated the need to manually instrument distributed tracing in your environment. Instana automatically instruments your applications with technology-specific sensors and begins collecting distributed traces across your entire environment. Armed with end-to-end distributed traces of every request, users are quickly able to understand a request’s flow through multiple distributed systems, thus enabling the quick resolution of any service impacts.
As customers increasingly embrace cloud platforms (AWS, GCP, Azure, etc.), applications are rapidly becoming even more distributed. At the same time, architectures rely more and more on services provided by the cloud platforms themselves, like databases, load balancers and message queues. Also, as more teams realize the importance of observability, often there are several, incompatible distributed tracing approaches within the same enterprise. Instana continues to believe that Dev+Ops teams should be able to access all of their data, whenever and wherever they need it. To this end, Instana is introducing support for W3C Trace Context.
Compatibility issues between distributed tracing implementations
Most distributed tracing systems existing today work on similar premises: a
trace is made of
spans. Spans describe actions, like serving a request or generating a request, and are related to one another with relationships like
child-of. Moreover, spans carry data as
tags, which are fundamentally key-value pairs that describe what the span represents.
Despite all these similarities, even the smallest differences in technical implementations, like which HTTP headers to use, end up in broken traces and lost data. Systems in a distributed trace need to collaborate to propagate the
trace context, that is, the definition of which trace is being executed and what was the last span in it. Think of it like a relay race, the discipline of track and field sports in which the athletes take turns running and passing one another the baton. Each service in a distributed trace is an athlete and, during its leg of the race, it records spans about what it does and sends them to an application performance monitoring solution for analysis. In this analogy, the trace context is the baton: if one of the services drops it, or the handoff between services is not successful because, for example, they implement different distributed tracing protocols, the trace is broken.
What is W3C Trace Context?
W3C Trace Context aims to provide a common protocol and format for distributed tracing that is agnostic from any particular project or vendor implementation. It is a specification that defines the format and rules for propagating distributed tracing context between services that communicate over HTTP by providing:
- A unique identifier for individual traces and requests, allowing trace data of multiple providers to be linked together
- An agreed-upon mechanism to forward vendor-specific trace data and avoid broken traces when multiple tracing tools participate in a single transaction
- An industry standard that intermediaries, platforms, and hardware providers can support
Over HTTP communication, the industry consensus on how to propagate the trace context from client to server is via HTTP headers. To ensure that would not be lost as it passes from vendor to vendor, or from vendor to cloud service, the specification introduces two standard HTTP headers,
traceparent header conveys the trace identifier and the last known span identifier, so that the system on the other side can create new spans knowing to what trace they belong and what is their parent span. The
tracestate header is used for any additional information a system might need to optimize the routing and processing of data.
W3C Trace Context is a joint effort by Open Source projects, Cloud providers and APM vendors, and has been gaining popularity and adoption, among others, by the OpenTelemetry project, an open source observability framework developed by CNCF.
End-to-end trace continuity
Becoming W3C Trace Context compliant has enabled vendors like Instana, open source tracing projects, and cloud providers to better communicate tracing data to the advantage of the end users. By participating in W3C Trace Context, Instana is ensuring that users will have access to the complete, continuous trace across cloud platforms and Instana. The Instana agent automatically propagates W3C Trace Context data and enables other tooling down the line to consume it, without additional effort on the end user. As cloud providers and other vendors continue to adopt W3C Trace Context, Instana will leverage the information in trace context data to provide even more useful trace analysis capabilities in our Unbounded Analytics.
No sampling, no partial traces
Instana’s commitment to collecting a trace for every request (no sampling, no partial traces) carries over to our support of W3C Trace Context and the continued effort in extending the scope of the specification to binary formats and other protocols. Instana users will be able to troubleshoot issues even faster as Instana automatically correlates traces from compliant sources with AutoTrace traces giving users the trace continuity they need even when traces span services being monitored by different vendors. This gives developers and operators everything they need to get to the root cause of any issue and quickly find the bottlenecks in their code, to improve application performance and end user experience.
W3C Trace Context is but the first step of many
W3C Trace Context provides a solution for HTTP communication, but there are many other protocols out there: messaging over Kafka rather than MQTT or JMS, remote procedure call over gRPC, asynchronous communication over SignalR, binary protocols from other generations of technology, and so much more. These are all technologies commonly found side-by-side in cloud-native architectures and legacy systems alike, and must be brought under a common standard for trace-context propagation. The W3C Trace Context working group will keep working on defining common formats and protocols to achieve trace continuity across vendors, open source projects and cloud providers to the advantage of the end-user. Instana is extremely passionate about distributed tracing. As such, Instana has been participating from the beginning and is looking forward to continuing this fundamental work with the community.
Curious to see how it works?
To see how Instana’s distributed tracing works in your environment, sign up for a free trial today. Want to see Instana’s distributed tracing but not sure you want to set it up in your environment? No problem, you can now play with Instana in our APM Observability Sandbox.