-
Notifications
You must be signed in to change notification settings - Fork 569
fix: Make PropagationContext.from_incoming_data always return a PropagationContext #5186
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
| self._propagation_context = propagation_context | ||
| self._propagation_context = PropagationContext.from_incoming_data(incoming_data) | ||
|
|
||
| # TODO-neel this below is a BIG code smell but requires a bunch of other refactoring |
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.
@alexander-alderman-webb since you wanted me to point out more insights like these, this branch and how it interacts with the get_active_propagation_context method logic is still pretty badly implemented.
ad10877 to
3f4dfd4
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5186 +/- ##
==========================================
+ Coverage 83.94% 83.98% +0.03%
==========================================
Files 181 181
Lines 18419 18417 -2
Branches 3281 3280 -1
==========================================
+ Hits 15462 15467 +5
+ Misses 1944 1938 -6
+ Partials 1013 1012 -1
|
3f4dfd4 to
fe6cb05
Compare
…nContext When there is any sort of incoming data, and since `continue_trace` is always intended to be at a system boundary, we always want to force a new trace if there's no incoming propagation or an incorrect propagation header. What previously happened is in these cases, a single `trace_id` was kept alive in the `propagation_context` even when these were just meant to be new independent traces (see screenshot). I think this will actually solve many complaints about long living traces that were never supposed to be such.
fe6cb05 to
5dae95a
Compare
sentrivana
left a comment
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.
So do I get this right:
- Before, if
sentrytrace_datawas wrong or not there we'd simply continue using the existing propagation context, meaning we'd be propagating the trace from before - Now, we instead create a brand new
PropagationContextwith new trace info
If that's the case, sounds like a much needed fix.
|
yep pretty much :/ |
Description
When there is any sort of incoming data, and since
continue_traceis always intended to be at a system boundary, we always want to force a new trace if there's no incoming propagation or a mismatched propagation headers (forstrict_trace_continuation).What previously happened in these cases: a single
trace_idwas kept alive in thepropagation_contexteven when these were meant to be new independent traces (see screenshot that shows undesired behavior before this fix).I think this will actually solve many complaints about long living traces that were never supposed to be such.