Skip to content

Conversation

@yarinzirlin
Copy link

  • Updated imports from v1 (gopkg.in/DataDog/dd-trace-go.v1) to v2 (github.com/DataDog/dd-trace-go/v2)
  • Updated struct types to use pointers (*tracer.Span, *tracer.SpanContext) as required by v2
  • Replaced deprecated ChildOf() pattern with modern v2 approach:
    • Use Span.StartChild() for direct parent spans
    • Use tracer.WithStartSpanConfig() for span contexts
  • Updated tests to handle v2 API changes (pointer types for mocktracer.Span)
  • Removed unused helper functions (newSpanContextReader, spanContextReader)
  • All tests passing

This upgrade ensures compatibility with the latest Datadog APM features and removes dependency on deprecated v1 APIs.

What was changed

Updated dd-trace-go from the deprecated v1 to v2

Why?

  1. dd-trace-go v1 stopped working

Checklist

  1. How was this tested:
    I ran the upgraded interceptor against my Datadog instance and saw the expected traces

- Updated imports from v1 (gopkg.in/DataDog/dd-trace-go.v1) to v2
(github.com/DataDog/dd-trace-go/v2)
- Updated struct types to use pointers (*tracer.Span,
*tracer.SpanContext) as required by v2
- Replaced deprecated ChildOf() pattern with modern v2 approach:
  - Use Span.StartChild() for direct parent spans
  - Use tracer.WithStartSpanConfig() for span contexts
- Updated tests to handle v2 API changes (pointer types for
mocktracer.Span)
- Removed unused helper functions (newSpanContextReader,
spanContextReader)
- All tests passing

This upgrade ensures compatibility with the latest Datadog APM features
and removes dependency on deprecated v1 APIs.
@yarinzirlin yarinzirlin requested a review from a team as a code owner November 18, 2025 08:36
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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