From 6d8524593704e810b90b05945bc9fb0729806f04 Mon Sep 17 00:00:00 2001 From: Emmett Butler Date: Wed, 1 May 2024 06:51:34 -0700 Subject: [PATCH] fix propagation --- ddtrace/contrib/botocore/services/sqs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ddtrace/contrib/botocore/services/sqs.py b/ddtrace/contrib/botocore/services/sqs.py index fee6cb3f40a..25de175853a 100644 --- a/ddtrace/contrib/botocore/services/sqs.py +++ b/ddtrace/contrib/botocore/services/sqs.py @@ -135,6 +135,8 @@ def _patched_sqs_api_call(parent_ctx, original_func, instance, args, kwargs, fun else: call_name = trace_operation + child_of = parent_ctx.get_item("distributed_context") + if should_instrument: with core.context_with_data( "botocore.patched_sqs_api_call", @@ -142,6 +144,7 @@ def _patched_sqs_api_call(parent_ctx, original_func, instance, args, kwargs, fun span_name=call_name, service=schematize_service_name("{}.{}".format(pin.service, endpoint_name)), span_type=SpanTypes.HTTP, + child_of=child_of if child_of is not None else pin.tracer.context_provider.active(), activate=True, instance=instance, args=args,