Skip to content

Commit c17ffab

Browse files
committed
fix: do not include computedSpans if the startSpan is not found
1 parent ee74b23 commit c17ffab

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/v3/recordingComputeUtils.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ export function getComputedSpans<
114114
definition: traceDefinition,
115115
}),
116116
)
117-
: undefined
117+
: startSpanMatcher
118118

119-
const matchingStartTime = matchingStartEntry
120-
? matchingStartEntry.span.startTime.now
121-
: input.startTime.now
119+
const matchingStartTime =
120+
matchingStartEntry === 'operation-start'
121+
? input.startTime.now
122+
: matchingStartEntry?.span.startTime.now
122123

123124
const endSpanMatcher =
124125
endSpan === 'operation-end'

0 commit comments

Comments
 (0)