Skip to content

Commit b483ddc

Browse files
Distro uses env for pass aws_context_propagation
1 parent 811f417 commit b483ddc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

solarwinds_apm/distro.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ def load_instrumentor(self, entry_point: EntryPoint, **kwargs):
116116
# Note: Django ORM accepts options in settings.py
117117
# https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/django/django.html
118118
kwargs["commenter_options"] = self.detect_commenter_options()
119+
120+
# Set disable for AwsLambdaInstrumentor. Assumes kwargs ignored
121+
# if not implemented for current instrumentation library
122+
kwargs["disable_aws_context_propagation"] = environ.get(
123+
"OTEL_LAMBDA_DISABLE_AWS_CONTEXT_PROPAGATION"
124+
)
125+
119126
try:
120127
instrumentor: BaseInstrumentor = entry_point.load()
121128
except Exception as ex: # pylint: disable=broad-except

0 commit comments

Comments
 (0)