Skip to content

feat(sampler-composite): rename createComposableTraceIDRatioBasedSampler to createComposableProbabilitySampler#6564

Open
ravitheja4531-cell wants to merge 4 commits intoopen-telemetry:mainfrom
ravitheja4531-cell:feat/rename-composable-probability-sampler
Open

feat(sampler-composite): rename createComposableTraceIDRatioBasedSampler to createComposableProbabilitySampler#6564
ravitheja4531-cell wants to merge 4 commits intoopen-telemetry:mainfrom
ravitheja4531-cell:feat/rename-composable-probability-sampler

Conversation

@ravitheja4531-cell
Copy link
Copy Markdown

@ravitheja4531-cell ravitheja4531-cell commented Apr 6, 2026

Summary

  • Renames createComposableTraceIDRatioBasedSamplercreateComposableProbabilitySampler in @opentelemetry/sampler-composite per issue rename createComposableTraceIDRatioBasedSampler to createComposableProbabilitySampler #6540
  • Renames internal class ComposableTraceIDRatioBasedSamplerComposableProbabilitySampler
  • Replaces src/traceidratio.ts with src/probability.ts and test/traceidratio.test.ts with test/probability.test.ts
  • Updates README.md and experimental/CHANGELOG.md

Closes #6540

Test plan

  • All 69 tests pass in experimental/packages/sampler-composite
  • New probability.test.ts covers description strings and sampling ratios

…ler to createComposableProbabilitySampler

Renames the function and class to align with the consistent probability
sampling specification. The old `traceidratio` source and test files are
replaced with `probability` equivalents.

Closes open-telemetry#6540

Signed-off-by: Ravi Theja <ravitheja4531@gmail.com>
@ravitheja4531-cell ravitheja4531-cell requested a review from a team as a code owner April 6, 2026 14:03
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.75%. Comparing base (1cf5ef3) to head (a7b0634).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6564      +/-   ##
==========================================
+ Coverage   95.74%   95.75%   +0.01%     
==========================================
  Files         371      375       +4     
  Lines       12514    12725     +211     
  Branches     2962     3013      +51     
==========================================
+ Hits        11981    12185     +204     
- Misses        533      540       +7     
Files with missing lines Coverage Δ
...ntal/packages/sampler-composite/src/probability.ts 95.45% <100.00%> (ø)

... and 12 files with indirect coverage changes

🚀 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.

Comment thread experimental/CHANGELOG.md Outdated
@maryliag
Copy link
Copy Markdown
Contributor

maryliag commented Apr 9, 2026

Hey @ravitheja4531-cell I just noticed this is your first contribution in this repo! Welcome and thank you for contributing! 😄

There is just one small suggestion I made that you can "commit suggestion" and we should be able to approve/merge after that!

Co-authored-by: Marylia Gutierrez <maryliag@gmail.com>
@ravitheja4531-cell
Copy link
Copy Markdown
Author

@maryliag Thanks for the guidance .Really appreciate that . Commited the changes as suggested.

Copy link
Copy Markdown
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

thank you for working on this 🙌
looks good overall, changelog entry should go into the breaking changes section though :)

Comment thread experimental/CHANGELOG.md Outdated
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Comment thread experimental/CHANGELOG.md Outdated
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.

rename createComposableTraceIDRatioBasedSampler to createComposableProbabilitySampler

3 participants