Skip to content

Commit

Permalink
Fix the error of not finding subspan
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchao authored and xiaochaoren1 committed Dec 7, 2023
1 parent a71412e commit 3b4e682
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/app/application/l7_flow_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,11 @@ def format_selftime(traces, parent_trace, child_ids, uid_index_map):
if parent_self_time == 0:
return
for child_id in child_ids:
child_trace = traces[uid_index_map[child_id]]
trace_index = uid_index_map.get(child_id, -1)
if trace_index == -1:
log.warning(f"The sub-span cannot be found: {child_id}")
continue
child_trace = traces[trace_index]
child_self_time = child_trace["end_time_us"] - child_trace[
"start_time_us"]
if child_self_time > 0 and child_self_time <= parent_trace["selftime"]:
Expand Down

0 comments on commit 3b4e682

Please sign in to comment.