1515import typing
1616
1717from opentelemetry .context .context import Context
18- from opentelemetry .trace . propagation import textmap
18+ from opentelemetry .propagators import textmap
1919
2020logger = logging .getLogger (__name__ )
2121
2222
2323class CompositeHTTPPropagator (textmap .TextMapPropagator ):
24- """ CompositeHTTPPropagator provides a mechanism for combining multiple
24+ """CompositeHTTPPropagator provides a mechanism for combining multiple
2525 propagators into a single one.
2626
2727 Args:
@@ -39,12 +39,12 @@ def extract(
3939 carrier : textmap .TextMapPropagatorT ,
4040 context : typing .Optional [Context ] = None ,
4141 ) -> Context :
42- """ Run each of the configured propagators with the given context and carrier.
42+ """Run each of the configured propagators with the given context and carrier.
4343 Propagators are run in the order they are configured, if multiple
4444 propagators write the same context key, the propagator later in the list
4545 will override previous propagators.
4646
47- See `opentelemetry.trace.propagation .textmap.TextMapPropagator.extract`
47+ See `opentelemetry.propagators .textmap.TextMapPropagator.extract`
4848 """
4949 for propagator in self ._propagators :
5050 context = propagator .extract (getter , carrier , context )
@@ -56,12 +56,12 @@ def inject(
5656 carrier : textmap .TextMapPropagatorT ,
5757 context : typing .Optional [Context ] = None ,
5858 ) -> None :
59- """ Run each of the configured propagators with the given context and carrier.
59+ """Run each of the configured propagators with the given context and carrier.
6060 Propagators are run in the order they are configured, if multiple
6161 propagators write the same carrier key, the propagator later in the list
6262 will override previous propagators.
6363
64- See `opentelemetry.trace.propagation .textmap.TextMapPropagator.inject`
64+ See `opentelemetry.propagators .textmap.TextMapPropagator.inject`
6565 """
6666 for propagator in self ._propagators :
6767 propagator .inject (set_in_carrier , carrier , context )
@@ -71,7 +71,7 @@ def fields(self) -> typing.Set[str]:
7171 """Returns a set with the fields set in `inject`.
7272
7373 See
74- `opentelemetry.trace.propagation .textmap.TextMapPropagator.fields`
74+ `opentelemetry.propagators .textmap.TextMapPropagator.fields`
7575 """
7676 composite_fields = set ()
7777
0 commit comments