Skip to content

Add knuth sampling formula #3281

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

genesor
Copy link
Member

@genesor genesor commented Jun 3, 2025

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.

@genesor genesor requested a review from a team as a code owner June 3, 2025 18:21
@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.28%. Comparing base (86b1fc6) to head (875af45).
Report is 7 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3281      +/-   ##
============================================
- Coverage     75.00%   73.28%   -1.73%     
  Complexity     2969     2969              
============================================
  Files           119      146      +27     
  Lines         11685    16134    +4449     
  Branches          0     1110    +1110     
============================================
+ Hits           8764    11823    +3059     
- Misses         2921     3734     +813     
- Partials          0      577     +577     
Flag Coverage Δ
appsec-extension 68.71% <ø> (?)
tracer-php 75.01% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 28 files 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 data
Powered by Codecov. Last update 86b1fc6...875af45. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link

pr-commenter bot commented Jun 4, 2025

Benchmarks [ tracer ]

Benchmark execution time: 2025-06-11 09:40:37

Comparing candidate commit 875af45 in PR branch ben.db/APMAPI-1266-knuth-sampling with baseline commit 86b1fc6 in branch master.

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

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟩 execution_time [-7.172µs; -6.128µs] or [-3.260%; -2.786%]

Copy link
Collaborator

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

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

Looks good :-)

@genesor genesor changed the title Add knuth sampling formula Add knuth sampling formula & drop support for target_span Jun 11, 2025
@genesor genesor requested a review from bwoebi June 11, 2025 08:48
@genesor genesor changed the title Add knuth sampling formula & drop support for target_span Add knuth sampling formula Jun 23, 2025
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.

3 participants