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

otel sampling fix

Open mtoffl01 opened this issue 5 months ago • 1 comments

What does this PR do?

Locks the trace sampling priority when it's been inherited by a parent span context.

Motivation

APMS-15887

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.
  • [ ] New code is free of linting errors. You can check this by running golangci-lint run locally.
  • [ ] 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!

mtoffl01 avatar Jun 11 '25 18:06 mtoffl01

Benchmarks

Benchmark execution time: 2025-07-02 17:54:16

Comparing candidate commit 21ca316d521da22cc7cd0863b2b776b16cc74fad in PR branch mtoff/otel-sampling-fix with baseline commit f94844aa2840f5d935546434e48244d958f4ec1a in branch v1-maintenance.

Found 1 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 1 unstable metrics.

scenario:BenchmarkSetTagStringer-24

  • 🟩 execution_time [-7.816ns; -3.924ns] or [-5.277%; -2.650%]

pr-commenter[bot] avatar Jun 11 '25 19:06 pr-commenter[bot]

Closing in favor of https://github.com/DataDog/dd-trace-go/pull/3718

mtoffl01 avatar Jul 02 '25 20:07 mtoffl01