ReactRouter v6 instrumentation does not consider initialEntries
for pageload transactions when using memory router
#14814
Labels
initialEntries
for pageload transactions when using memory router
#14814
Description
A user reported that they are using
withSentryReactRouterV6Routing(Routes)
withcreateMemoryRouter()
.The user is passing in the initial routes to render via
createMemoryRouter
'sinitialEntries
option.They observed that for their application they exclusively got
/index.html
pageload transactions when the app loads. This is undesired behavior.We should probably use the
initialEntries
option for pageload transactions instead ofwindow.location.pathname
when available.One thing we need to be somewhat wary of is that people may use the same opts for a memory router and for a browser router and for the browser router it would probably be undesired to take the
initialEntries
. Maybe we need to be clever to properly distinguish.This should land in both the v8 and develop branches.
The text was updated successfully, but these errors were encountered: