-
Notifications
You must be signed in to change notification settings - Fork 544
Implement new continue_trace and make WSGI work #3460
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
Conversation
The new `continue_trace` API will no longer return a `Transaction` entity. Instead, it will simply update the propagation context and run as a contextmanager. (TODO) It will set a remote span on the OTEL context so that it can be picked up by `start_span` later.
❌ 3992 Tests Failed:
View the top 3 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
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.
Have you considered any way we might be able to avoid making a breaking API change to continue_trace
here?
I am thinking it might be possible to avoid this breaking change by somehow setting the environ_or_headers
on the transaction, then when the transaction is started, it would be responsible for calling PotelScope.continue_trace
when an environ_or_headers
is present. Have you considered doing something like this, and if yes, why are we choosing to make a breaking change, instead?
Admittedly, my suggestion might be a bit harder to think through than what you are suggesting in this PR, but it would come with the huge upside of not having a breaking change and therefore not needing to update all our continue_trace
calls (plus, less hassle for users when upgrading)
Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
yes I have considered and decided. JS also broke this and it's much better semantics this way. We might reconsider breaking changes together at the end when we are in an acceptable functional state but for now I want to focus on designing ideal semantics in the new world. |
Fair enough, I guess this is fine for now. I agree that if we were designing this from scratch, it would probably make the most sense to do it your way, but I think we should really try to avoid a breaking change here if we can |
Why we are making the breaking API change: #3486 (review) |
The new
continue_trace
API will no longer return aTransaction
entity. Instead, it will simply update the propagation context and run as a contextmanager.(TODO) It will set a remote span on the OTEL context so that it can be picked up by
start_span
later.closes #3458
working flask + sqlalchemy trace