Announcing Go Tracer V1.0.0 | Datadog

Announcing Go tracer v1.0.0

Author Gabriel Aszalos
@gabrielaszalos

Published: July 9, 2018

We’re happy to announce that our Go tracer v1.0.0 has been released. The latest version represents a major overhaul, and includes performance improvements, more robust compatibility with tracing standards, and a new and improved API. It incorporates continuous feedback not only from our community, but also from extensive internal usage here at Datadog. We are proud to say that we’ve been testing this new version in production over the past five months and that we’ve fully migrated to it internally. We’re very pleased with the results and in sharing them with you!

We’ve gathered our experiences and findings from this migration process and wanted to share them with the community. This post will outline all the improvements, features, and benefits that this update provides, and provide guidance for users who would like to upgrade to the latest version of our Go tracer.

Go tracer traces requests even if they're distributed across hosts or containers
One of the biggest features included in our Go tracer v1.0.0 is distributed tracing, which enables you to trace a single request as it flows across multiple services.

Goals

We kept three main goals in mind as we developed the new version of the Go tracer. One of our goals with this release was to provide a stable, flexible, and simplified API that our users could rely on for extended periods of time. This release marks our commitment to abide by the standards of semantic versioning. This was of great importance to us due to the addition of modules in Go 1.11. Going forward, our Go tracer will consistently maintain versioning that correctly indicates the level of changes that occurred in the project.

A secondary goal was to provide a tracer that includes better support for vendor-neutral tracing standards, such as OpenTracing and OpenCensus. In addition to enhancing our existing support for OpenTracing, we also recently launched our OpenCensus exporter.

Last but not least, our third goal was to address long-term open issues, improve performance, simplify code, and provide better support to the community. To achieve this goal, we dedicated special forces to the maintenance of this project and as a result dozens of issues have been closed.

We’re pleased to say that we’ve successfully accomplished all of these goals in the latest release, but our work doesn’t end there. We will continue to incorporate internal and external feedback from the Datadog community in future releases of our Go tracing client.

Features and improvements

One of the biggest features included in this release is distributed tracing. Whether you are using HTTP, gRPC, or even a custom protocol, it is now quite easy to attach tracing information into your pipeline. Most common protocols are supported out of the box. For example, our net/http integration will automatically recognize tracing information attached in HTTP headers when handling server requests. You can see more details in our documentation.

On the same topic, we’ve introduced support for distributed sampling priority, which gives you more control over how our sampling algorithms handle traces by marking the ones that are of specific interest to you.

This is only the tip of the iceberg. Besides adding new features, we also resolved several problems and as a result have observed significant increases in performance when it comes to handling concurrent, high-traffic environments, as well as when it comes to memory and CPU usage. We have accomplished this by improving the way the payload is handled and encoded before it is sent to the Agent. As a result, we’ve observed reductions of up to 90% in the tracer’s memory and CPU usage on some of our services. Here’s a snapshot of the change in overall memory consumption for one of our services after the update:

Go tracer memory usage decreased in the new version
After upgrading to the new version of the Go tracer, we observed a significant reduction in overall memory consumption on one of our high-throughput services.

You can view the entire set of changes that happened in this release by observing the issues marked with the 1.0.0 milestone in our GitHub repository.

Upgrading

To ensure that we make it easy to upgrade to this new version, we made this switch internally on our production code before releasing, so that we could experience the process ourselves and be able to fully understand our users’ point of view. We’ve used the gradual code repair technique to accomplish this and have successfully done so without much effort. To make it easier to do this we’ve launched this version of the tracer under a different import path, which enables you to use both tracers in parallel for the duration of the migration. This allows you to migrate your services gradually, ensuring minimal downtime, stability, security, and risk-free updates.

We’ve written a migration guide to help with upgrading from previous versions. You can read it here.

What’s next?

Try it out and tell us what you think! We’re keen on receiving your feedback—you can upgrade to the newest version by following our migration guide, or start a free trial , if you’re new to Datadog. You can read our Go tracer documentation here and the godoc page here.

We hope that you will be as happy as we were with these changes, and we hope to continue delivering a stable, full-featured, and bug-free tracing system for you to use in your Go applications. You’re always welcome to ask for our support or even submit a question on GitHub. We also welcome contributions, but before committing to any work, make sure to read our contribution guidelines.