dd-trace-go icon indicating copy to clipboard operation
dd-trace-go copied to clipboard

[Draft; don't merge] v2.0.0-beta

Open darccio opened this issue 1 year ago • 4 comments

What does this PR do?

This PR is a preview of the changes that will be merged into main for v2 release as github.com/DataDog/dd-trace-go/v2.

Motivation

These are the main motivations behind releasing a v2:

  • Migrate from gopkg.in: this causes pain in enterprise customers.
  • Long due refactor: moving away from interfaces in favor of concrete types in the API is a requirement to avoid situations where we had to hack a solution because adding functions caused breaking changes.
  • Mitigate false-positive results from third party security scanners: due to our bloated go.mod pulling contrib’s dependencies. Also, remove deprecated dependencies’ contribs.
  • Reduce library misuse: introduce better patterns, like using context to start spans to ensure trace propagation.
  • Long backlog of proposals blocked waiting for a never-getting-planned v2.

Reviewer's Checklist

  • [ ] Changed code has unit tests for its functionality at or near 100% coverage.
  • [ ] System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • [ ] There is a benchmark for any new code, or changes to existing code.
  • [ ] If this interacts with the agent in a new way, a system test has been added.
  • [ ] Add an appropriate team label so this PR gets put in the right place for the release notes.

For Datadog employees:

  • [ ] If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • [ ] This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

darccio avatar Dec 12 '23 15:12 darccio

Benchmarks

Benchmark execution time: 2024-05-16 08:41:02

Comparing candidate commit 1422d9c3e95a7b713b81e1ee7508812a4814fc8c in PR branch v2-dev with baseline commit 635266fdf70a116d3b23f14b222b4327acaec26e in branch main.

Found 2 performance improvements and 9 performance regressions! Performance is the same for 29 metrics, 1 unstable metrics.

scenario:BenchmarkHttpServeTrace-24

  • 🟥 execution_time [+671.722ns; +809.478ns] or [+4.048%; +4.878%]

scenario:BenchmarkOTelApiWithCustomTags/datadog_otel_api-24

  • 🟥 execution_time [+393.313ns; +453.887ns] or [+8.366%; +9.655%]
  • 🟩 allocated_mem [-190 bytes; -181 bytes] or [-5.136%; -4.891%]

scenario:BenchmarkOTelApiWithCustomTags/otel_api-24

  • 🟩 allocated_mem [-200 bytes; -187 bytes] or [-4.018%; -3.766%]

scenario:BenchmarkPartialFlushing/Disabled-24

  • 🟥 execution_time [+12.834ms; +15.877ms] or [+4.679%; +5.788%]

scenario:BenchmarkPartialFlushing/Enabled-24

  • 🟥 execution_time [+18.189ms; +21.463ms] or [+6.692%; +7.896%]

scenario:BenchmarkSingleSpanRetention/no-rules-24

  • 🟥 execution_time [+18.696µs; +20.903µs] or [+7.899%; +8.831%]

scenario:BenchmarkSingleSpanRetention/with-rules/match-all-24

  • 🟥 execution_time [+21.056µs; +24.041µs] or [+8.849%; +10.103%]

scenario:BenchmarkSingleSpanRetention/with-rules/match-half-24

  • 🟥 execution_time [+18.698µs; +20.906µs] or [+7.874%; +8.804%]

scenario:BenchmarkTracerAddSpans-24

  • 🟥 allocated_mem [+57 bytes; +57 bytes] or [+2.527%; +2.527%]
  • 🟥 execution_time [+94.393ns; +152.807ns] or [+2.384%; +3.859%]

pr-commenter[bot] avatar Mar 14 '24 11:03 pr-commenter[bot]

This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar May 01 '24 01:05 github-actions[bot]

This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Jun 12 '24 01:06 github-actions[bot]

This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Aug 02 '24 01:08 github-actions[bot]