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

v2: remove deprecated samplingpriority #2890

Closed
wants to merge 3 commits into from

Conversation

hannahkm
Copy link
Contributor

@hannahkm hannahkm commented Sep 26, 2024

What does this PR do?

Remove support for the SamplingPriority constant, which was deprecated in PR #1082. Replace instances with ManualKeep and ManualDrop.

  • Previously, "kept" spans and traces could have a SamplingPriority of either 1 or 2. They should now use samplingDecision = 2 to indicate they should be kept.
  • "dropped" spans and traces used to have SamplingPriority 0 or -1. Now, it has value samplingDecision=1

Motivation

For v2 release, we should remove support for deprecated constants and functions, especially those that have been deprecated for many, subsequent minor versions.

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.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@hannahkm hannahkm mentioned this pull request Sep 26, 2024
6 tasks
@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Sep 26, 2024
@pr-commenter
Copy link

pr-commenter bot commented Sep 26, 2024

Benchmarks

Benchmark execution time: 2024-09-26 14:54:22

Comparing candidate commit 301391b in PR branch hannah/remove-samplingpriority with baseline commit 7d4b68c in branch v2-dev.

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

scenario:BenchmarkInjectW3C-24

  • 🟩 execution_time [-136.856ns; -105.544ns] or [-3.245%; -2.502%]

scenario:BenchmarkSetTagMetric-24

  • 🟩 execution_time [-6.234ns; -3.546ns] or [-5.193%; -2.954%]

scenario:BenchmarkSingleSpanRetention/no-rules-24

  • 🟥 allocated_mem [+169.626KB; +169.912KB] or [+102.420%; +102.593%]
  • 🟥 allocations [+1724; +1724] or [+120.982%; +120.982%]
  • 🟥 execution_time [+42.376µs; +44.097µs] or [+16.927%; +17.615%]

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

  • 🟥 allocated_mem [+166.887KB; +167.128KB] or [+99.209%; +99.352%]
  • 🟥 allocations [+1724; +1724] or [+120.982%; +120.982%]
  • 🟥 execution_time [+45.054µs; +47.613µs] or [+17.890%; +18.906%]

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

  • 🟥 allocated_mem [+165.930KB; +166.159KB] or [+98.695%; +98.831%]
  • 🟥 allocations [+1724; +1724] or [+120.982%; +120.982%]
  • 🟥 execution_time [+43.619µs; +44.812µs] or [+17.312%; +17.786%]

scenario:BenchmarkTracerAddSpans-24

  • 🟥 allocated_mem [+2.211KB; +2.217KB] or [+94.278%; +94.541%]
  • 🟥 allocations [+25; +25] or [+100.000%; +100.000%]
  • 🟥 execution_time [+516.578ns; +552.622ns] or [+12.539%; +13.413%]

@hannahkm hannahkm closed this Sep 27, 2024
@hannahkm hannahkm deleted the hannah/remove-samplingpriority branch September 27, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant