Skip to content
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

fix boundary sampler so it is true to given rate #226

Merged

Conversation

jamesmoessis
Copy link
Contributor

Fixes #225

Solution works accurately on both amd64 and arm64 architectures.

Adds test to ensure number of sampling decisions falls within a given range.

Avoid float to int conversion which is platform dependent for high values (such as trace IDs)

Copy link
Member

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

feel free to drop or edit my comment suggestions. figured we might as well while looking at it.

sample.go Show resolved Hide resolved
sample.go Show resolved Hide resolved
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.11%. Comparing base (87e3b85) to head (0124bb8).
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
+ Coverage   66.83%   68.11%   +1.27%     
==========================================
  Files          36       43       +7     
  Lines        1770     2744     +974     
==========================================
+ Hits         1183     1869     +686     
- Misses        542      821     +279     
- Partials       45       54       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codefromthecrypt
Copy link
Member

security fail is unrelated to your change of course https://github.com/openzipkin/zipkin-go/actions/runs/13170134138?pr=226

jamesmoessis and others added 2 commits February 6, 2025 13:44
Co-authored-by: Adrian Cole <[email protected]>
Co-authored-by: Adrian Cole <[email protected]>
@codefromthecrypt codefromthecrypt merged commit 7c09a19 into openzipkin:master Feb 6, 2025
7 of 8 checks passed
@codefromthecrypt
Copy link
Member

thanks for the help!

@jamesmoessis jamesmoessis deleted the fix-boundary-sampler branch February 6, 2025 03:48
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.

BoundarySampler has an effective minimum rate of 0.5 on amd64 architectures
2 participants