Skip to content

Conversation

@jblacker
Copy link

@jblacker jblacker commented Nov 26, 2025

What was changed

This PR adds support for dd-trace-go v2 within the contrib/datadog/tracer integration in two ways. First it updates the existing interceptor to use the latest v1 version of dd-trace-go: v1.74.6, which adds a backwards-compatible compatibility layer between v1 & v2. Next I created a new nested v2 module where all the existing interceptor files were copied over followed by updating the version to v2.3.0, which as expected was no longer buildable due to breaking API changes. I updated all of these locations to make sure the module could build once again and pass all unit tests.

Why?

The version used was pretty old (v1.58.1) and cannot be used the dd-trace-go/v2 module is in use. We learned this the hard way when we found that certain services that have upgraded no longer included temporal workflows in their traces. I bumped the dd-trace-go version to v1.74.6 to allow backwards compatibility for all dd-trace-go users.

However, there's still a potential issue. This makes it so v1 will remain in use and newer features will no be usable through the v1 version if they are in use. Therefore to handle this I created the nested v2 version. We can move this to another location or come up with another strategy for this, but this version does not contain any v1 dependencies and handles all of the breaking changes allowing v1 to no longer be included and allowing the full feature set of dd-trace-go v2.

Checklist

  1. How was this tested:
  • Added additional unit tests
  • Ran all checks & tests (unit & integration tests)
  • Tested attached to another application using temporal workflows and both dd-trace-go v1 & v2
  • Testing attached to another application using temporal workflows and dd-trace-go v2 only. // IN PROGRESS
  1. Any docs updates needed?
    Documentation should be updated to point users to the correct package based on the based on the version of dd-trace-go currently in use.

NOTE: IN DRAFT UNTIL TESTING COMPLETED

@CLAassistant
Copy link

CLAassistant commented Nov 26, 2025

CLA assistant check
All committers have signed the CLA.

This version is the latest version and has no breaking changes, but is compatible with v2 under the hood. This is the only version that allows both v1 & v2 to be installed at the same time.
To completely use v2 of dd-trace-go we must be on the v2 breaking change branch. However, we don't want to cause breaking changes for current users, and we also want to make sure that we respect Go backwards compatibility & semantic versioning.

To that end, the v2 version of this integration uses the most recent version and does not have any remnants of v1. Additionally, it handles the breaking changes between API versions.
@jblacker jblacker force-pushed the add-ddtrace-v2-compatability branch from 0a65e26 to 28c2d1b Compare November 26, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants