---
title: "Announcing Go tracer v2.0.0"
description: "Learn about a new API and other feature improvements available in the latest iteration of our Go tracer."
author: "Dario Castañé"
date: 2025-06-05
tags: ["apm", "go"]
blog_type_id: the-monitor
locale: en
---

Datadog has long supported the monitoring of instrumented Go applications through our [Go tracer v1](https://docs.datadoghq.com/tracing/trace_collection/compatibility/go.md?tab=v1#go-tracer-support). As the Go ecosystem has continued to mature, we’ve been hard at work collecting feedback and improving upon the tracer’s capabilities and usability features.

We are now thrilled to announce the release of our [Go tracer v2.0.0](https://github.com/DataDog/dd-trace-go). This major update includes better security and stability, and a new and simplified API. In creating this updated version, we have incorporated valuable feedback both from our customer community and from our own teams at Datadog who use the Go tracer extensively. We have already tested this new version in production and have migrated all our internal services.

This post will introduce the new features of Go tracer v2 and provide guidance for users about how to upgrade.

## Improved developer experience and security

The new version of the Go tracer offers a number of new improvements.

### Simpler API

The Go tracer v2 provides a simpler, leaner, and more consistent API that improves the developer experience. For example, child spans are now created using the `StartChild` method on the parent span. Moreover, all options are now standardized with the same signature across all contribs (integrations), making it easier to use them in a consistent way.

> [!NOTE]
> **Simplified syntax in creating child spans**
> You can see the difference in how child spans are created in these code samples for the Go tracer [v1](https://github.com/DataDog/dd-trace-go/blob/ffe26f7eb1fdc29a99c120342f73950082fcec6f/ddtrace/example_test.go#L45) and [v2](https://github.com/DataDog/dd-trace-go/blob/b97e7cb/ddtrace/example_test.go#L41), respectively.

### Enhanced security posture

The new Go tracer version overhauls the older approach to integrations. Previously, we used a single Go module to hold all our contribs. In v2, we've reduced the number of dependencies on `dd-trace-go`, isolating our contribs' dependencies in their own modules so that these integrations are now all independent modules. This change keeps the number of exposed dependencies to a minimum and prevents false positives—in security scanners and automation tools like [Dependabot](https://github.com/dependabot)—that were previously caused by exposing indirect dependencies.

> [!NOTE]
> **Removing support for OpenTracing**
> Since the Go tracer v1 was first released in 2018, the [OpenTracing standard has merged with OpenCensus to form OpenTelemetry](https://medium.com/opentracing/a-roadmap-to-convergence-b074e5815289). To reflect this newer standard, the Go tracer v2 has removed support for the older OpenTracing standard and now supports only OpenTelemetry.

### Import URL change

In v2, we have moved away from using `gopkg.in` as our public package repository in favor of `github.com`. This change reflects the need for a more scalable and reliable solution.

The new repository affects the import URL in different ways for different types of dependencies. For example, to import the tracer library itself, you now use:

`import “github.com/DataDog/dd-trace-go/v2/ddtrace/tracer”`

To import third-party contrib packages, you would use a URL with the following pattern:

`import "github.com/DataDog/dd-trace-go/contrib/<PACKAGE_DIR>/<PACKAGE_NAME>/v2"`

For example, to import the net/http integration, you would use the following URL:

`import “github.com/DataDog/dd-trace-go/contrib/net/http/v2”`

For a list of the Go tracer’s supported packages and their import URLs, see [our documentation](https://docs.datadoghq.com/tracing/trace_collection/compatibility/go.md?tab=v2#framework-compatibility).

### Config structs

We’ve introduced support for providing all configurations in a single struct, which can now be passed to the `NewStartSpanConfig` and `WithStartSpanConfig` functions and replace the need for multiple distinct functional options. This gives you more control over the tracer's impact on hot paths in your code and allows you to reduce CPU overhead by preparing common span tags in your traces. Note that the Go functional options are still supported, but see [this article by a Datadog engineer](https://www.evanjones.ca/go-functional-options-slow.html) for some background about related performance issues.

To view the complete set of changes implemented in this release, refer to the issues and PRs marked with the [v2.0 label](https://github.com/DataDog/dd-trace-go/issues?q=sort%3Aupdated-desc%20state%3Aclosed%20label%3Av2.0) in our GitHub repository.

> [!NOTE]
> **Staggered migration by service**
> It’s safe for different services within your organization to use different tracer versions during the transition. Some can use v1 while others adopt v2\. Staggering the upgrade per service can minimize downtime and help ensure stability throughout your transition.

## Upgrade guidance

You can upgrade to the Go tracer v2 by following the instructions in our [migration guide](https://github.com/DataDog/dd-trace-go/blob/main/MIGRATING.md). As mentioned in the guide, we provide a [v2 Migration Tool](https://github.com/DataDog/dd-trace-go/blob/main/tools/v2fix/README.md) to simplify the upgrade process.

For more information, refer to our Go tracer [documentation](https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/go.md) and the [godoc page](https://pkg.go.dev/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer).

### Go tracer v1.74.0: The v1 transitional version

For customers that have large codebases and that are unable to completely upgrade services to the Go tracer v2 by [the end-of-life for v1](https://docs.datadoghq.com/tracing/trace_collection/compatibility/go.md?tab=v1#go-tracer-support), we are offering a special transitional version of the Go tracer v1. The Go tracer v1 transitional version is a wrapper that preserves the API from v1 but uses v2 under the hood.

The transitional version is the only v1 version that allows both v1 and v2 to be imported in the same service—enabling you to migrate a service gradually. Using this v1 transitional version doesn’t require any code changes, but it also won’t support any new features introduced in the new v2 tracer.

The v1 transitional version is available as [v1.74.0](https://pkg.go.dev/gopkg.in/DataDog/dd-trace-go.v1@v1.74.0). We encourage all customers to upgrade to this transitional version while they prepare to transition *their existing services* to v2. We also encourage all customers to use v2 only for new services. If you have concerns or reasons to not upgrade to the transitional version, [contact us](https://www.datadoghq.com/support/) and we’ll work together to resolve them.

Consult [our documentation](https://docs.datadoghq.com/tracing/trace_collection/compatibility/go.md?tab=v1#go-tracer-support) for more key dates related to our Go tracer version support.

> [!NOTE]
> **Important**
> At Datadog, we are fully committed to the stability of the Go ecosystem. This major version update to the Go tracer v2 comes many years after our v1 tracer was introduced (in 2018), and there is no v3 for the Go tracer planned at this time.

Although we are offering the v1 transitional version for the convenience of our customers, we strongly encourage you to upgrade to the v2 version as soon as possible to benefit from the newest features and improvements.

## Try out the Datadog Go tracer v2

Our work does not end here. We will continue to incorporate both internal and external feedback from the Datadog community in future updates to our new Go tracing v2 client. Try it out and let us know what you think! We are eager to receive your feedback.

We hope that you will be as happy as we are with these changes, and we look forward to continuing to deliver a stable, full-featured, and bug-free tracing system for you to use in your Go applications. If you need support or have any questions, feel free to [ask us](https://www.datadoghq.com/support/) or submit a [question on GitHub](https://github.com/DataDog/dd-trace-go/issues/new?labels=question).

And if you’re not yet a Datadog customer, you can sign up for our <!-- Sign-up trigger (free trial) omitted -->.