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

Fixes issue #661 - debug trace not sampled #662

Closed

Conversation

tgeens
Copy link

@tgeens tgeens commented Mar 21, 2018

The test SamplingFlagsTest#debugImpliesSampled uses a Builder to construct a SamplingFlags object. The problem is that the Builder contains the logic that implicitly enables sampling, when the debug flag is set. But not all sampling-flags are created using that Builder!

The solution provided here is moving the logic back to the .sampled() method, for both:

  1. SamplingFlagsImpl.sampled() and
  2. the static Boolean sampled(int flags) used by TraceContext and TraceIdContext

This should resolve issue #661

@codefromthecrypt
Copy link
Member

sorry I didn't see this. I appreciate your help, but since I've made #663 with tests and such are you ok with me closing this?

@codefromthecrypt
Copy link
Member

otherwise you can merge my changes into yours.. your choice

@codefromthecrypt
Copy link
Member

thank you for this change. I fixed it in a different way in #663 which allows me to immediately release a patch for you. Please do help again next time!

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