Skip to content

Commit

Permalink
Fix navigation span end
Browse files Browse the repository at this point in the history
It looks like we weren't ending the span when a new navigation span was
being started.
  • Loading branch information
ankur22 committed Sep 10, 2024
1 parent bead56c commit 6a5a314
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/frame_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,11 @@ func (fs *FrameSession) processNavigationSpan(url string, id cdp.FrameID) {
return
}

// End the navigation span if it is non-nil
if fs.mainFrameSpan != nil {
fs.mainFrameSpan.End()
}

_, fs.mainFrameSpan = TraceNavigation(
fs.ctx, fs.targetID.String(), trace.WithAttributes(attribute.String("navigation.url", url)),
)
Expand Down

0 comments on commit 6a5a314

Please sign in to comment.