Closed sissbruecker closed 2 years ago
Even though the navigation target is now correct the rootSpan gives conflicting information:
It names route as statistics
even though the target is accounts
and the browser fails on the route accounts and doesn't revert to statistics.
@caalador Yeah, it's an intentional decision and a compromise. The current logic is better in cases where no navigation happened at all because the navigation was post-poned by a BeforeLeaveObserver
, or the exception happened in a BeforeLeaveObserver
. There might be other cases where the browser does not get to update the URL due to a navigation error.
I would rather have beforeLeave wrong than this as it doesn't give the correct data and is most likely much more likely to happen. @emarc what is your take on this.
Fixes the
AbstractNavigationStateRendererInstrumentation
to show the route that navigation was attempted to, instead of the route that the UI has after navigation. The UI route might not have changed if an error occurs or the navigation is postponed.The root span still shows the route that the UI had after the navigation as it would not be correct to update it if the navigation was postponed.
Fixes #94