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

Update sampling algorithm to use random.random() #9

Merged
merged 1 commit into from
Sep 29, 2016

Conversation

mjbryant
Copy link

Addresses #8

@coveralls
Copy link

coveralls commented Sep 29, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling e451592 on mbryant-issue-8-sample-rate-over-50 into 1724d7d on master.

@kaisen
Copy link
Member

kaisen commented Sep 29, 2016

🚢

@mjbryant mjbryant merged commit ae1fa8a into master Sep 29, 2016
@prat0318
Copy link

the rationale behind the previous logic was to make the selection deterministic. So, if we wanted to not change sample ratio we can chose a trace id such that it would result in selection.

If trace_ids are random, then it would lead to correct randomness in selections as well, but if they are not, then it might lead to what is seen in #8.

@kaisen
Copy link
Member

kaisen commented Sep 29, 2016

@prat0318 heh, @mbryant and I talked about that particular reason during lunch :) It's an useful way of ensuring a particular trace_id is sampled (as long as the sampling rate stays constant) but there are better ways to force a trace now.

@prat0318
Copy link

++

@mjbryant mjbryant deleted the mbryant-issue-8-sample-rate-over-50 branch September 30, 2016 18:34
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.

None yet

4 participants