You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ref: Support outgoing trace propagation in span first (18) (#5638)
Couple things going on in this PR. Bear with me, this is probably the
most all over the place span first PR because the outgoing trace
propagation changes make mypy complain about things elsewhere in the
sdk.
### 1. Outgoing trace propagation
Support getting trace propagation information from the span with
`_get_traceparent`, `_get_baggage`, `_iter_headers`, etc. These mirror
the old `Span` class to make integrating `StreamedSpan`s with the rest
of the SDK easier (since they're used throughout), with one difference:
they're explicitly private, while the corresponding `Span` methods were
public. Added aliases to them so that we can use the private methods
everywhere.
There is definite clean up potential here once we get rid of the old
spans and we no longer have to make the streaming span interface work
with the existing helper scope methods.
### 2. Addressing cascading mypy issues
Now that we're officially allowing `StreamedSpan`s to be set on the
scope, a LOT of type hints need updating all over the SDK. In many
places, I've added explicit guards against functionality that doesn't
exist in span first mode. This should prevent folks from using the wrong
APIs in the wrong SDK mode (tracing vs. static) as well as make mypy
happy.
---------
Co-authored-by: Erica Pisani <pisani.erica@gmail.com>
0 commit comments