Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thevilledev
Copy link
Collaborator

@thevilledev thevilledev commented Aug 19, 2025

1. Why is this pull request needed and what does it do?

Migrates the DataDog tracing integration dd-trace-go from v1 to v2. Version 1 will be deprecated by the end of this year. See docs here.

Changes:

  • Upgrade dd-trace-go dependency to v2.2.2
  • Separate Zipkin and DataDog code paths for better maintainability
  • Add proper tracer shutdown through OnShutdown()
  • Replace deprecated opentracer.New() with tracer.Start()
  • Add tests

Validated with a DataDog test account that spans are being spawned properly, with the proper tags.

2. Which issues (if any) are related?

Fixes #7372.

3. Which documentation changes (if any) need to be made?

None - configuration syntax and behavior remain identical for users.

4. Does this introduce a backward incompatible change or deprecation?

This change is fully backwards compatible:

  • All span tag names preserved (coredns.io@name, coredns.io@type, etc.)
  • Trace ID format unchanged
  • Configuration syntax identical
  • No functional changes for end users

- Upgrade dd-trace-go dependency to v2.2.2
- Separate Zipkin and DataDog code paths for better maintainability
- Add proper tracer shutdown through OnShutdown()
- Replace deprecated opentracer.New() with direct tracer.Start()
- Added tests

Signed-off-by: Ville Vesilehto <[email protected]>
@codecov
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

❌ Patch coverage is 81.48148% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.92%. Comparing base (93c57b6) to head (265952c).
⚠️ Report is 1576 commits behind head on master.

Files with missing lines Patch % Lines
plugin/trace/trace.go 83.01% 4 Missing and 5 partials ⚠️
plugin/trace/setup.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7466      +/-   ##
==========================================
+ Coverage   55.70%   59.92%   +4.22%     
==========================================
  Files         224      274      +50     
  Lines       10016    18135    +8119     
==========================================
+ Hits         5579    10867    +5288     
- Misses       3978     6632    +2654     
- Partials      459      636     +177     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yongtang yongtang merged commit 2b273d4 into coredns:master Aug 20, 2025
13 checks passed
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.

plugin/trace: update dd-trace-go from v1 to v2

2 participants