-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(expo): Do not run the SDK during static routes generation #3730
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lucas-zimerman
approved these changes
Apr 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Android (legacy) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
e2b64fe | 316.88 ms | 330.23 ms | 13.35 ms |
3ffcddd | 302.92 ms | 315.80 ms | 12.88 ms |
70caa60+dirty | 299.00 ms | 321.02 ms | 22.02 ms |
abb7058 | 370.27 ms | 389.58 ms | 19.31 ms |
80b2ce3 | 385.02 ms | 387.36 ms | 2.34 ms |
9433f35 | 347.64 ms | 356.22 ms | 8.58 ms |
0677344 | 327.74 ms | 337.14 ms | 9.40 ms |
52a8031+dirty | 311.55 ms | 321.37 ms | 9.82 ms |
0db0c72 | 372.12 ms | 386.00 ms | 13.88 ms |
3853f43 | 329.68 ms | 346.32 ms | 16.64 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
e2b64fe | 17.73 MiB | 19.80 MiB | 2.07 MiB |
3ffcddd | 17.73 MiB | 19.75 MiB | 2.02 MiB |
70caa60+dirty | 17.73 MiB | 19.75 MiB | 2.01 MiB |
abb7058 | 17.73 MiB | 19.83 MiB | 2.10 MiB |
80b2ce3 | 17.73 MiB | 19.75 MiB | 2.02 MiB |
9433f35 | 17.73 MiB | 19.81 MiB | 2.08 MiB |
0677344 | 17.73 MiB | 19.81 MiB | 2.07 MiB |
52a8031+dirty | 17.73 MiB | 20.04 MiB | 2.31 MiB |
0db0c72 | 17.73 MiB | 19.75 MiB | 2.02 MiB |
3853f43 | 17.73 MiB | 19.81 MiB | 2.08 MiB |
iOS (new) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
0db0c72+dirty | 1258.88 ms | 1262.52 ms | 3.64 ms |
9433f35+dirty | 1232.24 ms | 1232.74 ms | 0.50 ms |
76d1baf+dirty | 1245.00 ms | 1257.76 ms | 12.76 ms |
e2b64fe+dirty | 1285.78 ms | 1297.56 ms | 11.78 ms |
8900e1a+dirty | 1268.36 ms | 1273.04 ms | 4.68 ms |
e73f4ed+dirty | 1282.90 ms | 1309.30 ms | 26.40 ms |
3853f43+dirty | 1271.74 ms | 1278.04 ms | 6.30 ms |
27ef4ee+dirty | 1236.41 ms | 1244.90 ms | 8.49 ms |
d7401ac+dirty | 1288.10 ms | 1289.54 ms | 1.44 ms |
22e31b6+dirty | 1276.55 ms | 1278.12 ms | 1.57 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
0db0c72+dirty | 2.92 MiB | 3.40 MiB | 492.71 KiB |
9433f35+dirty | 2.92 MiB | 3.41 MiB | 503.55 KiB |
76d1baf+dirty | 2.92 MiB | 3.38 MiB | 475.74 KiB |
e2b64fe+dirty | 2.92 MiB | 3.41 MiB | 499.97 KiB |
8900e1a+dirty | 2.92 MiB | 3.39 MiB | 485.96 KiB |
e73f4ed+dirty | 2.92 MiB | 3.38 MiB | 475.71 KiB |
3853f43+dirty | 2.92 MiB | 3.41 MiB | 503.54 KiB |
27ef4ee+dirty | 2.92 MiB | 3.41 MiB | 503.72 KiB |
d7401ac+dirty | 2.92 MiB | 3.40 MiB | 488.06 KiB |
22e31b6+dirty | 2.92 MiB | 3.43 MiB | 524.74 KiB |
3 tasks
byCedric
added a commit
to expo/expo
that referenced
this pull request
Jul 16, 2024
# Why Instead of force-closing the process, this gives the process a bit of time before exiting. With this, we could catch problems around open handles and send telemetry info if they start happening again. The telemetry would be more useful if we also capture dependencies whenever this happens, e.g. `@sentry/react-native` was known to freeze static rendering export ([fixed here](getsentry/sentry-react-native#3730)) # How - Added `ensureProcessExitsAfterDelay` - This is a simple `setTimeout` with a maximum delay of 10s - It uses [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v18.x/api/process.html#processgetactiveresourcesinfo) - Logs resource information through debug logs (no telemetry yet) # Test Plan `DEBUG=expo:utils:exit expod export ...` should show: ![image](https://github.com/expo/expo/assets/1203991/9c7a0a8f-33aa-4a9c-9894-427e3c4786fe) # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
Before this PR the Sentry RN SDK would be initialized during static routes generation by
expo-router
. This could cause issues as the SDK is not prepared to run on the server side. This behavior pollutes the dev server and export command logs.Before: See the duplicate WARN labels caused by the SDK init.
💚 How did you test it?
sample app
📝 Checklist
sendDefaultPII
is enabled🔮 Next steps