Skip to content

Commit f281ebf

Browse files
committed
add comment
1 parent a0209f7 commit f281ebf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_opentelemetry_distro.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ def _configure(self, **kwargs):
7474

7575
if os.environ.get(OTEL_PROPAGATORS, None) is None:
7676
os.environ.setdefault(OTEL_PROPAGATORS, "tracecontext,baggage,xray")
77+
# We need to explicitly reload the opentelemetry.propagate module here
78+
# because this module initializes the default propagators when it loads very early in the chain.
79+
# Without reloading the OTEL_PROPAGATOR config from this distro won't take any effect.
80+
# It's a hack from our end until OpenTelemetry fixes this behavior for distros to
81+
# override the default propagators.
7782
importlib.reload(propagate)
7883

7984
os.environ.setdefault(OTEL_PYTHON_ID_GENERATOR, "xray")

0 commit comments

Comments
 (0)