Commit 05047ad
authored
feat(tracing): Track wrapExpoRouterErrorBoundary adoption (#6425)
* feat(core): Track GlobalErrorBoundary adoption
Register a no-op `GlobalErrorBoundary` integration when the
component mounts so the name flows through to
`event.sdk.integrations` — the same channel used for feature-
adoption signals like `MobileFeedback` and `AppStart`.
Also introduces a shared `registerFeatureMarker` helper.
Subsequent markers for other opt-in features
(NavigationContainer, ExpoRouter error boundary, AppLoaded, ...)
will use this helper — see #6415.
Refs: #6415
* feat(tracing): Track wrapExpoRouterErrorBoundary adoption
Register a no-op `ExpoRouterErrorBoundary` integration when the
wrapped Expo Router error boundary mounts so the name flows
through to `event.sdk.integrations`.
Refs: #6415
* fix(tracing): Fire ExpoRouterErrorBoundary marker at wrap-call time
The wrapped boundary only mounts when Expo Router actually
renders it (i.e., on an error), so a `useEffect`-based marker
would undercount adoption for apps that ship the wrap but never
hit a route error. Registering at wrap-call time fires as soon
as the user's route file evaluates.
No client is present if the wrap is called before
`Sentry.init()`, but that is very rare in practice — Expo Router
lazy-loads route files during navigation, so init has typically
completed by then.1 parent af67055 commit 05047ad
2 files changed
Lines changed: 26 additions & 2 deletions
File tree
- packages/core
- src/js/tracing
- test/tracing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
67 | 77 | | |
68 | 78 | | |
69 | 79 | | |
| |||
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
21 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
| |||
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
83 | 97 | | |
84 | 98 | | |
85 | 99 | | |
| |||
0 commit comments