Commit 22f8e5a
authored
fix(react): Do not send additional navigation span on pageload (#17799)
The React Router instrumentation created an additional `navigation` span
on `pageload`.
On initial load, the lazy route has the history action `POP` and state
`idle`. This leads to the generation of a `navigation` span.
I added a condition to early-return from `handleNavigation` if a page
load is going on.
Closes issue (in Linear)
https://linear.app/getsentry/issue/FE-551/configure-react-router-for-fully-parameterized-routes-with-sentry1 parent 0b4a7b1 commit 22f8e5a
File tree
2 files changed
+38
-0
lines changed- dev-packages/e2e-tests/test-applications/react-router-7-lazy-routes/tests
- packages/react/src/reactrouter-compat-utils
2 files changed
+38
-0
lines changedLines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
26 | 57 | | |
27 | 58 | | |
28 | 59 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
570 | 577 | | |
571 | 578 | | |
572 | 579 | | |
| |||
0 commit comments