Skip to content

Commit 63e41cb

Browse files
want to keep looping
1 parent 2f8dfaa commit 63e41cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

datadog_lambda/tracing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,13 @@ def extract_context_from_sqs_or_sns_event_or_context(
328328
logger.debug(
329329
"Found dd-trace injected trace context from AWSTraceHeader"
330330
)
331-
return Context(
331+
context = Context(
332332
trace_id=int(trace_id_parts[2][8:], 16),
333333
span_id=int(x_ray_context["parent_id"], 16),
334334
sampling_priority=float(x_ray_context["sampled"]),
335335
)
336+
if not config.data_streams_enabled:
337+
break
336338
except Exception as e:
337339
logger.debug("The trace extractor returned with error %s", e)
338340

0 commit comments

Comments
 (0)