-
Notifications
You must be signed in to change notification settings - Fork 250
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
span context: set the default recorded flag to 0, and fix default trace options bug #474
span context: set the default recorded flag to 0, and fix default trace options bug #474
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
CLAs look good, thanks! |
Please rebase and fix lint. |
The lint error appears to be wholly unrelated to this PR, in a file not touched. Do you want it fixed in this change? |
I see, For some reason lint didn't fail on my local machine. For now please ignore the error and just rebase against master. |
I looked into the same issue in #482. There's another problem here: multiple Note that we still set the tracing bit in opencensus-python/opencensus/trace/tracer.py Lines 79 to 89 in f669aa9
This might be the behavior you want, but to merge this PR we also need a test to show that the old behavior is broken. E.g. that the tracer used to sample even while using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add the test to show that the old behavior was wrong we can merge this.
@wsabransky any chance we can get some tests :) |
@bogdandrutu @c24t Sorry about the delay, I'll add some tests today. |
@c24t @bogdandrutu Okay, apparently there were already tests that cover this case, but they weren't included by the test runner because of how they were named. Additionally, a scoping problem was causing the default trace options to be overwritten at runtime in some cases. |
@c24t any chance we could get this merged? |
@wsabransky it looks like this change breaks a jaeger integration test. I may have time to check it out later, but it can't merge as-is. |
…ncensus-python into change-default-traceflags
@c24t looks like it was just a fixture that needed to be updated to reflect the new behavior in this PR. I've made the change. |
Thanks @wsabransky! |
Closes #298 .
Currently, the default trace option for a new trace context is to set
enabled
to true. This causes all samplers applied to be ignored here. We should keep the parent sampling decision if it is true, but ignore it if false. A parent shouldn't be able to force a downstream service to not sample.Also fixes bug described here.