dd-trace-php
dd-trace-php copied to clipboard
Add knuth sampling formula
Description
This PR changes the current sampling formula to the one used in every tracer in order to have consistent sampling.
The tracer now applies sampling decisions for distributed traces missing the sampling decision.
Reviewer checklist
- [ ] Test coverage seems ok.
- [ ] Appropriate labels assigned.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 61.92%. Comparing base (3076898) to head (bb55152).
:warning: Report is 73 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #3281 +/- ##
==========================================
- Coverage 61.93% 61.92% -0.02%
==========================================
Files 140 140
Lines 12356 12356
Branches 1616 1616
==========================================
- Hits 7653 7651 -2
- Misses 3992 3995 +3
+ Partials 711 710 -1
see 1 file with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 3076898...bb55152. Read the comment docs.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Benchmarks [ tracer ]
Benchmark execution time: 2025-07-24 19:08:08
Comparing candidate commit bb55152a2538bbe5859cac9f344e0c6af2cefff4 in PR branch ben.db/APMAPI-1266-knuth-sampling with baseline commit 3076898282b38d87007e47bd5a27a143e0e760b1 in branch master.
Found 0 performance improvements and 1 performance regressions! Performance is the same for 177 metrics, 0 unstable metrics.
scenario:PHPRedisBench/benchRedisOverhead
- 🟥
execution_time[+32.963µs; +60.172µs] or [+2.120%; +3.869%]