Skip to content

Conversation

@Neurostep
Copy link
Contributor

@Neurostep Neurostep commented Dec 1, 2025

Description

A few months ago DataDog team announced a new major release v2 of the dd-trace-go. It contains many API improvements, but most importantly, they stopped supporting v1.

In this PR we are upgrading the dd-trace-go library to v2. Since some APIs have changed, the PR contains changes to reflect that.

For downstream services, most notable change is that tracer.Start returns an error. This will be propagated using parity workflow.

Testing considerations

  • Deploy to development/staging of go-chassis and check if all is working as before

Checklist

  • Prefixed the PR title with the JIRA ticket code
  • Performed simple, atomic commits with good commit messages
  • Verified that the commit history is linear and commits are squashed as necessary
  • Thoroughly tested the changes in development and/or staging
  • Updated the README.md as necessary

Related links


Note

Upgrades dd-trace-go to v2 and updates all instrumentation, tracer APIs, and tests (service option rename, Start returns error, span/trace ID types), plus dependency bumps.

  • Tracing/Instrumentation (v2 migration):
    • Replace all gopkg.in/DataDog/dd-trace-go.v1 imports with github.com/DataDog/dd-trace-go/v2 and contrib .../v2 packages.
    • Rename options: WithServiceName(...) -> WithService(...); SQL/GORM registration updated accordingly.
    • tracer.Start now returns error; Tracer.Start() updated to return error.
    • Span types updated to *tracer.Span; Kafka helpers and carriers adjusted; trace context propagation preserved.
    • Logging: LogContext.TraceID changed from uint64 to string (v2 API).
  • Integrations:
    • AWS SDK v2, gRPC, Gorilla Mux, net/http, Redis, GORM, and SQL tracing moved to v2 contrib packages and APIs.
  • Tests:
    • Updated to use v2 mocktracer, ext, and new types/option names.
  • Dependencies:
    • go.mod/go.sum updated: add dd-trace-go v2 and contrib v2 modules; bump multiple DataDog/OTel and related indirect deps; remove v1 packages.

Written by Cursor Bugbot for commit 96b89ec. This will update automatically on new commits. Configure here.

@Neurostep Neurostep changed the title feat: Upgrade dd-trace-go to v2 [DEVPLAT-6347] Upgrade dd-trace-go to v2 Dec 1, 2025
@Neurostep Neurostep marked this pull request as ready for review December 1, 2025 17:00
@Neurostep Neurostep requested a review from a team as a code owner December 1, 2025 17:00
Copy link
Member

@terranisu terranisu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks upgraded to me 🚀

@Neurostep Neurostep merged commit 74a0b15 into main Dec 2, 2025
10 checks passed
@Neurostep Neurostep deleted the maksimt/DEVPLAT-6347/dd-trace-go-v2 branch December 2, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants