-
Notifications
You must be signed in to change notification settings - Fork 569
ref: Cleanup outgoing propagation_context logic #5215
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5215 +/- ##
==========================================
- Coverage 84.25% 84.23% -0.02%
==========================================
Files 181 181
Lines 18463 18458 -5
Branches 3288 3282 -6
==========================================
- Hits 15556 15549 -7
- Misses 1894 1902 +8
+ Partials 1013 1007 -6
|
e480bc1 to
9c8bfff
Compare
|
|
||
| # Fall back to isolation scope's traceparent. It always has one | ||
| return self.get_isolation_scope().get_traceparent() | ||
| # TODO-neel will never happen |
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.
follow up PR
#5217
9c8bfff to
1ac88a0
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.
Two small comments re naming for now, will still review properly, need to understand the new flow
| # type: () -> str | ||
| return f"{self.trace_id}-{self.span_id}" | ||
|
|
||
| def get_baggage(self): |
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.
Same nit as above
| def get_baggage(self): | |
| def to_baggage(self): |
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.
we actually don't use Span.to_baggage anywhere and the Span.iter_headers uses get_baggage from the transaction itself so I'll leave this as get_baggage.
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.
Much, much better already, thank you!
1ac88a0 to
d5b454a
Compare
d5b454a to
598e594
Compare
Description
get_baggage,get_traceparentanditer_headerstoPropagationContextso that the contract is similar toSpan.PropagationContextandSpanare themselves responsible for constructing these values and not theScope.Scopewhich does not clarify state responsibilities correctly on who holds and can populate what.Baggage.populate_from_propagation_contextas a replacement forBaggage.from_options(that took ascopeargument).propagation_contextpresence checks inScopemethods toget_active_propagation_context.get_active_propagation_contextlogic then remains the central problem to fix in the future.Deprecations
The following methods are thus no longer used internally and deprecated.
Scope.get_dynamic_sampling_contextScope.iter_headersBaggage.from_options