Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft; don't merge] v2.0.0-rc #2427

Draft
wants to merge 726 commits into
base: main
Choose a base branch
from
Draft

[Draft; don't merge] v2.0.0-rc #2427

wants to merge 726 commits into from

Conversation

darccio
Copy link
Member

@darccio darccio commented Dec 12, 2023

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!

ddtrace/example_test.go Outdated Show resolved Hide resolved
ddtrace/opentelemetry/span.go Outdated Show resolved Hide resolved
ddtrace/opentelemetry/tracer_test.go Outdated Show resolved Hide resolved
internal/appsec/waf_test.go Outdated Show resolved Hide resolved
internal/appsec/emitter/httpsec/http.go Outdated Show resolved Hide resolved
internal/appsec/trace/grpctrace/grpc.go Outdated Show resolved Hide resolved
internal/contrib/httptrace/httptrace.go Outdated Show resolved Hide resolved
internal/appsec/listener/grpcsec/grpc.go Show resolved Hide resolved
internal/appsec/waf.go Outdated Show resolved Hide resolved
ddtrace/tracer/tracer.go Outdated Show resolved Hide resolved
ddtrace/tracer/tracer_test.go Show resolved Hide resolved
ddtrace/tracer/tracer_test.go Show resolved Hide resolved
ddtrace/tracer/tracer_test.go Show resolved Hide resolved
appsec/appsec.go Show resolved Hide resolved
internal/contrib/sqltest/sqltest.go Outdated Show resolved Hide resolved
appsec/appsec_test.go Show resolved Hide resolved
internal/appsec/appsec_test.go Show resolved Hide resolved
@darccio darccio added this to the v2.0.0 milestone Jan 12, 2024
internal/contrib/namingschematest/cache.go Outdated Show resolved Hide resolved
internal/contrib/sqltest/sqltest.go Outdated Show resolved Hide resolved
appsec/appsec_test.go Show resolved Hide resolved
ddtrace/mocktracer/example_test.go Show resolved Hide resolved
ddtrace/opentelemetry/tracer.go Show resolved Hide resolved
ddtrace/opentelemetry/example_test.go Show resolved Hide resolved
ddtrace/opentelemetry/tracer.go Show resolved Hide resolved
internal/appsec/waf_test.go Show resolved Hide resolved
ddtrace/tracer/metrics_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/metrics_test.go Show resolved Hide resolved
ddtrace/tracer/metrics_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/metrics_test.go Show resolved Hide resolved
ddtrace/tracer/metrics_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/metrics_test.go Show resolved Hide resolved
ddtrace/tracer/metrics_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/metrics_test.go Show resolved Hide resolved
ddtrace/tracer/sampler.go Outdated Show resolved Hide resolved
@pr-commenter
Copy link

pr-commenter bot commented Mar 14, 2024

Benchmarks

Benchmark execution time: 2025-01-03 15:41:44

Comparing candidate commit 50298b9 in PR branch v2-dev with baseline commit 4f57a47 in branch main.

Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥
Check Gitlab CI job log to find if any benchmark has crashed.

Scenarios present only in baseline:

  • BenchmarkSampleWAFContext-24
  • BenchmarkStartRequestSpan-24

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

scenario:BenchmarkHttpServeTrace-24

  • 🟥 allocated_mem [+245 bytes; +290 bytes] or [+2.581%; +3.055%]
  • 🟥 allocations [+5; +5] or [+6.329%; +6.329%]
  • 🟥 execution_time [+913.158ns; +1040.442ns] or [+5.732%; +6.531%]

scenario:BenchmarkInjectW3C-24

  • 🟥 execution_time [+119.662ns; +156.938ns] or [+2.980%; +3.909%]

scenario:BenchmarkPartialFlushing/Disabled-24

  • 🟥 execution_time [+8.607ms; +10.670ms] or [+3.191%; +3.956%]

scenario:BenchmarkPartialFlushing/Enabled-24

  • 🟥 execution_time [+9.749ms; +13.106ms] or [+3.538%; +4.756%]

scenario:BenchmarkSetTagString-24

  • 🟩 execution_time [-10.208ns; -6.652ns] or [-8.224%; -5.359%]

scenario:BenchmarkSingleSpanRetention/no-rules-24

  • 🟥 execution_time [+9.802µs; +11.225µs] or [+4.090%; +4.684%]

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

  • 🟥 execution_time [+11.282µs; +12.637µs] or [+4.736%; +5.305%]

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

  • 🟥 execution_time [+12.567µs; +13.955µs] or [+5.266%; +5.847%]

scenario:BenchmarkStartSpan-24

  • 🟥 execution_time [+51.620ns; +72.980ns] or [+2.325%; +3.288%]

scenario:BenchmarkTracerAddSpans-24

  • 🟥 allocated_mem [+56 bytes; +57 bytes] or [+2.454%; +2.477%]

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Dec 20, 2024

Datadog Report

Branch report: v2-dev
Commit report: 0b97e84
Test service: dd-trace-go

✅ 0 Failed, 4075 Passed, 64 Skipped, 2m 44.72s Total Time

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.

8 participants