dd-trace-go
dd-trace-go copied to clipboard
otel sampling fix
What does this PR do?
Locks the trace sampling priority when it's been inherited by a parent span context.
Motivation
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 runlocally. - [ ] 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!
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%]
Closing in favor of https://github.com/DataDog/dd-trace-go/pull/3718