8000 Fix edge case where dd-trace context had parent source as Xray, when … · DataDog/datadog-lambda-python@795901a · GitHub
[go: up one dir, main page]

Skip to content

Commit 795901a

Browse files
committed
Fix edge case where dd-trace context had parent source as Xray, when trace merging was disabled
1 parent 510f1d0 commit 795901a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

datadog_lambda/tracing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def set_dd_trace_py_root(trace_context, merge_xray_traces):
234234

235235

236236
def create_function_execution_span(
237-
context, function_name, is_cold_start, trace_context
237+
context, function_name, is_cold_start, trace_context, merge_xray_traces
238238
):
239239
tags = {}
240240
if context:
@@ -246,7 +246,7 @@ def create_function_execution_span(
246246
"resource_names": context.function_name,
247247
}
248248
source = trace_context["source"]
249-
if source != TraceContextSource.DDTRACE:
249+
if source == TraceContextSource.XRAY and merge_xray_traces:
250250
tags["_dd.parent_source"] = source
251251

252252
args = {

0 commit comments

Comments
 (0)
0