Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ddapm_test_agent/trace_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,13 @@ def _normalize_traces(traces: List[Trace]) -> List[Trace]:
span["parent_id"] = span_id_map.get(parent_id, parent_id)
else:
# Normalize the parent of root spans to be 0.
parent_id = 0
span["parent_id"] = 0

if "meta" not in span:
span["meta"] = {}
elif span["meta"].get("_dd.parent_id"):
span["meta"]["_dd.parent_id"] = str(parent_id)
if "metrics" not in span:
span["metrics"] = {}
span_id += 1
Expand Down
Loading