[DEVPLAT-6347] Upgrade dd-trace-go to v2 #156
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A few months ago DataDog team announced a new major release
v2of the dd-trace-go. It contains many API improvements, but most importantly, they stopped supportingv1.In this PR we are upgrading the
dd-trace-golibrary tov2. Since some APIs have changed, the PR contains changes to reflect that.For downstream services, most notable change is that
tracer.Startreturns an error. This will be propagated using parity workflow.Testing considerations
Checklist
developmentand/orstagingUpdated theREADME.mdas necessaryRelated 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.
gopkg.in/DataDog/dd-trace-go.v1imports withgithub.com/DataDog/dd-trace-go/v2and contrib.../v2packages.WithServiceName(...)->WithService(...); SQL/GORM registration updated accordingly.tracer.Startnow returns error;Tracer.Start()updated to return error.*tracer.Span; Kafka helpers and carriers adjusted; trace context propagation preserved.LogContext.TraceIDchanged fromuint64tostring(v2 API).mocktracer,ext, and new types/option names.go.mod/go.sumupdated: 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.