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

[tracer] limit span and trace IDs to 63 bits #161

Merged
merged 1 commit into from
Jul 21, 2017
Merged

Conversation

ufoot
Copy link
Member

@ufoot ufoot commented Jul 21, 2017

One note here: I changed the MAX_ID to be 2**63 and not 2**63 -1 because most of the code using it needs the upper "excluded" limit. Eg, rand(2) returns 0 or 1, never 2. Also, we use operator % and it's the same -> to get something between 0 and MAX_ID, including MAX_ID, you'd do n % (MAX_ID+1). Globally, code is simpler when MAX_ID is just plain 2**63 without the - 1.

@ufoot ufoot requested a review from palazzem July 21, 2017 12:53
Copy link
Contributor

@palazzem palazzem left a comment

Choose a reason for hiding this comment

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

Perfect! I'll be sure that this happens also to the Python client. Thank you!

@ufoot ufoot added this to the 0.8.0 milestone Jul 21, 2017
@ufoot ufoot changed the base branch from christian/rack_dynamic_tracing to master July 21, 2017 15:22
@ufoot ufoot merged commit 5595d3d into master Jul 21, 2017
@palazzem palazzem deleted the christian/63bitids branch October 6, 2017 17:57
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.

2 participants