ref: Cleanup outgoing propagation_context logic#5215
Merged
sl0thentr0py merged 1 commit intomasterfrom Dec 11, 2025
Merged
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
sl0thentr0py
commented
Dec 10, 2025
|
|
||
| # Fall back to isolation scope's traceparent. It always has one | ||
| return self.get_isolation_scope().get_traceparent() | ||
| # TODO-neel will never happen |
9c8bfff to
1ac88a0
Compare
sentrivana
reviewed
Dec 11, 2025
Contributor
sentrivana
left a comment
There was a problem hiding this comment.
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): |
Contributor
There was a problem hiding this comment.
Same nit as above
Suggested change
| def get_baggage(self): | |
| def to_baggage(self): |
Member
Author
There was a problem hiding this comment.
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
approved these changes
Dec 11, 2025
Contributor
sentrivana
left a comment
There was a problem hiding this comment.
Much, much better already, thank you!
1ac88a0 to
d5b454a
Compare
d5b454a to
598e594
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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