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

Future proofing isSampled #9

Merged
merged 5 commits into from
Nov 11, 2024
Merged

Future proofing isSampled #9

merged 5 commits into from
Nov 11, 2024

Conversation

assensamuelsson
Copy link
Contributor

@assensamuelsson assensamuelsson commented Nov 8, 2024

Future prooing the calculation of isSampled.

The Trace Context specification only now supports 1 trace flag meaning the current implementation works.
However if the specification decides to add more flags it could lead to isSampled being incorrectly set.

E.g. traceFlags: "02" would set isSampled when the least significant bit FLAG_SAMPLED actually is not set.

Make sure we only check if the FLAG_SAMPLEDbit is set when calculating isSampled.

@assensamuelsson assensamuelsson merged commit 574bac3 into main Nov 11, 2024
2 checks passed
@assensamuelsson assensamuelsson deleted the fix/is-sampled branch November 11, 2024 14:41
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