Skip to content

fix(promise): Use engine-specific promise rejection tracking#4826

Merged
antonis merged 18 commits into
mainfrom
antonis/3957-hermes-rejection-tracker
May 20, 2025
Merged

fix(promise): Use engine-specific promise rejection tracking#4826
antonis merged 18 commits into
mainfrom
antonis/3957-hermes-rejection-tracker

Conversation

@antonis

@antonis antonis commented May 13, 2025

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

  • Uses Hermes's native tracker when available
  • Leverages Sentry Browser SDK for React Native Web
  • Falls back to existing implementation for JSC

💡 Motivation and Context

Fixes #3957

💚 How did you test it?

CI, Manual (mobile, web)

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions

github-actions Bot commented May 13, 2025

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 431.17 ms 458.02 ms 26.85 ms
Size 17.75 MiB 20.13 MiB 2.38 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
4a6664f 548.79 ms 585.00 ms 36.21 ms
d8e8c67 448.79 ms 438.70 ms -10.09 ms
18ce5e8 450.83 ms 436.08 ms -14.75 ms
deae061 409.04 ms 396.06 ms -12.98 ms
f80e57e 496.93 ms 482.26 ms -14.67 ms
5852d77 415.81 ms 421.02 ms 5.21 ms
30189be 440.46 ms 435.60 ms -4.85 ms
457e29f 398.10 ms 421.39 ms 23.29 ms
4bec795 437.23 ms 428.21 ms -9.02 ms
e540498 436.26 ms 433.00 ms -3.26 ms

App size

Revision Plain With Sentry Diff
4a6664f 17.73 MiB 19.94 MiB 2.21 MiB
d8e8c67 17.74 MiB 20.10 MiB 2.36 MiB
18ce5e8 17.74 MiB 20.10 MiB 2.36 MiB
deae061 17.75 MiB 20.13 MiB 2.38 MiB
f80e57e 17.75 MiB 20.13 MiB 2.38 MiB
5852d77 17.75 MiB 20.11 MiB 2.36 MiB
30189be 17.75 MiB 20.11 MiB 2.36 MiB
457e29f 17.73 MiB 19.84 MiB 2.10 MiB
4bec795 17.75 MiB 20.13 MiB 2.38 MiB
e540498 17.73 MiB 20.11 MiB 2.37 MiB

Previous results on branch: antonis/3957-hermes-rejection-tracker

Startup times

Revision Plain With Sentry Diff
9d73c56 370.16 ms 356.40 ms -13.76 ms
56715d9 413.89 ms 410.87 ms -3.02 ms
854278d 430.98 ms 427.08 ms -3.90 ms
adbfee0 394.31 ms 397.06 ms 2.76 ms
9ac2ec3 439.14 ms 426.10 ms -13.04 ms

App size

Revision Plain With Sentry Diff
9d73c56 17.75 MiB 20.13 MiB 2.38 MiB
56715d9 17.75 MiB 20.13 MiB 2.38 MiB
854278d 17.75 MiB 20.13 MiB 2.38 MiB
adbfee0 17.75 MiB 20.13 MiB 2.38 MiB
9ac2ec3 17.75 MiB 20.13 MiB 2.38 MiB

@github-actions

github-actions Bot commented May 13, 2025

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 405.17 ms 409.02 ms 3.85 ms
Size 7.15 MiB 8.40 MiB 1.25 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
f86dde7+dirty 363.98 ms 368.56 ms 4.58 ms
60ad48c+dirty 373.40 ms 393.20 ms 19.80 ms
2501f36+dirty 403.27 ms 427.94 ms 24.67 ms
241d647+dirty 384.77 ms 390.77 ms 6.00 ms
c1d0599+dirty 401.12 ms 398.98 ms -2.14 ms
3f05680+dirty 399.86 ms 405.20 ms 5.34 ms
ed3d77e+dirty 366.04 ms 411.33 ms 45.28 ms
13f280b+dirty 376.13 ms 406.41 ms 30.28 ms
deae061+dirty 410.00 ms 433.92 ms 23.92 ms
f54118b+dirty 250.87 ms 312.22 ms 61.35 ms

App size

Revision Plain With Sentry Diff
f86dde7+dirty 7.15 MiB 8.39 MiB 1.23 MiB
60ad48c+dirty 7.15 MiB 8.39 MiB 1.23 MiB
2501f36+dirty 7.15 MiB 8.40 MiB 1.25 MiB
241d647+dirty 7.15 MiB 8.40 MiB 1.25 MiB
c1d0599+dirty 7.15 MiB 8.40 MiB 1.25 MiB
3f05680+dirty 7.15 MiB 8.38 MiB 1.23 MiB
ed3d77e+dirty 7.15 MiB 8.35 MiB 1.21 MiB
13f280b+dirty 7.15 MiB 8.35 MiB 1.20 MiB
deae061+dirty 7.15 MiB 8.40 MiB 1.25 MiB
f54118b+dirty 7.15 MiB 8.37 MiB 1.22 MiB

Previous results on branch: antonis/3957-hermes-rejection-tracker

Startup times

Revision Plain With Sentry Diff
9d73c56+dirty 431.79 ms 463.82 ms 32.03 ms
9ac2ec3+dirty 361.06 ms 365.91 ms 4.85 ms
adbfee0+dirty 393.06 ms 393.60 ms 0.54 ms
854278d+dirty 395.54 ms 393.44 ms -2.10 ms
56715d9+dirty 391.02 ms 383.27 ms -7.75 ms

App size

Revision Plain With Sentry Diff
9d73c56+dirty 7.15 MiB 8.40 MiB 1.25 MiB
9ac2ec3+dirty 7.15 MiB 8.40 MiB 1.25 MiB
adbfee0+dirty 7.15 MiB 8.40 MiB 1.25 MiB
854278d+dirty 7.15 MiB 8.40 MiB 1.25 MiB
56715d9+dirty 7.15 MiB 8.40 MiB 1.25 MiB

@github-actions

github-actions Bot commented May 13, 2025

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1234.08 ms 1241.61 ms 7.53 ms
Size 3.19 MiB 4.37 MiB 1.18 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
de59d3a+dirty 1241.17 ms 1249.16 ms 8.00 ms
63ed251+dirty 1223.27 ms 1222.94 ms -0.33 ms
29e4db9+dirty 1216.20 ms 1213.85 ms -2.36 ms
148f924+dirty 1220.72 ms 1221.30 ms 0.58 ms
22e31b6+dirty 1276.55 ms 1278.12 ms 1.57 ms
eb597b3+dirty 1217.49 ms 1231.69 ms 14.20 ms
ed3d77e+dirty 1246.19 ms 1244.00 ms -2.19 ms
b6f8ea2+dirty 1254.10 ms 1236.67 ms -17.43 ms
6f52f97+dirty 1228.02 ms 1234.75 ms 6.73 ms
d053743+dirty 1223.18 ms 1214.25 ms -8.93 ms

App size

Revision Plain With Sentry Diff
de59d3a+dirty 2.92 MiB 3.67 MiB 772.59 KiB
63ed251+dirty 2.92 MiB 3.66 MiB 757.10 KiB
29e4db9+dirty 3.19 MiB 4.37 MiB 1.18 MiB
148f924+dirty 2.92 MiB 3.60 MiB 701.88 KiB
22e31b6+dirty 2.92 MiB 3.43 MiB 524.74 KiB
eb597b3+dirty 3.19 MiB 4.32 MiB 1.13 MiB
ed3d77e+dirty 2.92 MiB 3.66 MiB 758.57 KiB
b6f8ea2+dirty 3.19 MiB 4.25 MiB 1.06 MiB
6f52f97+dirty 3.19 MiB 4.34 MiB 1.16 MiB
d053743+dirty 3.19 MiB 4.32 MiB 1.13 MiB

Previous results on branch: antonis/3957-hermes-rejection-tracker

Startup times

Revision Plain With Sentry Diff
adbfee0+dirty 1222.33 ms 1230.96 ms 8.63 ms
854278d+dirty 1215.06 ms 1227.82 ms 12.75 ms
9d73c56+dirty 1231.71 ms 1231.13 ms -0.59 ms
9ac2ec3+dirty 1227.49 ms 1230.31 ms 2.82 ms
56715d9+dirty 1215.57 ms 1211.00 ms -4.57 ms

App size

Revision Plain With Sentry Diff
adbfee0+dirty 3.19 MiB 4.36 MiB 1.17 MiB
854278d+dirty 3.19 MiB 4.37 MiB 1.18 MiB
9d73c56+dirty 3.19 MiB 4.37 MiB 1.18 MiB
9ac2ec3+dirty 3.19 MiB 4.36 MiB 1.17 MiB
56715d9+dirty 3.19 MiB 4.37 MiB 1.18 MiB

@github-actions

github-actions Bot commented May 13, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1209.08 ms 1216.15 ms 7.06 ms
Size 2.63 MiB 3.80 MiB 1.17 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
de59d3a+dirty 1223.73 ms 1236.28 ms 12.55 ms
63ed251+dirty 1232.55 ms 1238.77 ms 6.22 ms
29e4db9+dirty 1222.41 ms 1214.49 ms -7.92 ms
148f924+dirty 1214.76 ms 1215.73 ms 0.97 ms
22e31b6+dirty 1253.62 ms 1265.96 ms 12.34 ms
eb597b3+dirty 1223.78 ms 1228.22 ms 4.44 ms
ed3d77e+dirty 1214.61 ms 1205.83 ms -8.78 ms
b6f8ea2+dirty 1236.08 ms 1228.58 ms -7.50 ms
6f52f97+dirty 1211.85 ms 1221.42 ms 9.57 ms
d053743+dirty 1213.69 ms 1218.88 ms 5.18 ms

App size

Revision Plain With Sentry Diff
de59d3a+dirty 2.36 MiB 3.11 MiB 760.16 KiB
63ed251+dirty 2.36 MiB 3.10 MiB 752.55 KiB
29e4db9+dirty 2.63 MiB 3.80 MiB 1.17 MiB
148f924+dirty 2.36 MiB 3.04 MiB 696.25 KiB
22e31b6+dirty 2.36 MiB 2.87 MiB 520.67 KiB
eb597b3+dirty 2.63 MiB 3.75 MiB 1.12 MiB
ed3d77e+dirty 2.36 MiB 3.10 MiB 753.32 KiB
b6f8ea2+dirty 2.63 MiB 3.68 MiB 1.05 MiB
6f52f97+dirty 2.63 MiB 3.78 MiB 1.14 MiB
d053743+dirty 2.63 MiB 3.75 MiB 1.12 MiB

Previous results on branch: antonis/3957-hermes-rejection-tracker

Startup times

Revision Plain With Sentry Diff
adbfee0+dirty 1208.78 ms 1222.46 ms 13.68 ms
854278d+dirty 1216.56 ms 1227.14 ms 10.58 ms
9d73c56+dirty 1235.49 ms 1237.24 ms 1.76 ms
9ac2ec3+dirty 1218.98 ms 1236.04 ms 17.06 ms
56715d9+dirty 1235.50 ms 1230.98 ms -4.52 ms

App size

Revision Plain With Sentry Diff
adbfee0+dirty 2.63 MiB 3.80 MiB 1.16 MiB
854278d+dirty 2.63 MiB 3.80 MiB 1.17 MiB
9d73c56+dirty 2.63 MiB 3.80 MiB 1.17 MiB
9ac2ec3+dirty 2.63 MiB 3.79 MiB 1.16 MiB
56715d9+dirty 2.63 MiB 3.80 MiB 1.17 MiB

@antonis antonis marked this pull request as ready for review May 14, 2025 08:24
Comment thread packages/core/src/js/integrations/reactnativeerrorhandlers.ts Outdated
Comment thread packages/core/src/js/integrations/reactnativeerrorhandlers.ts Outdated
Comment thread packages/core/src/js/integrations/reactnativeerrorhandlers.ts Outdated
Comment thread packages/core/src/js/integrations/reactnativeerrorhandlers.ts Outdated

@lucas-zimerman lucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread packages/core/src/js/integrations/reactnativeerrorhandlers.ts Outdated
Comment thread packages/core/src/js/integrations/reactnativeerrorhandlers.ts Outdated
Comment thread packages/core/src/js/integrations/reactnativeerrorhandlers.ts
@krystofwoldrich

Copy link
Copy Markdown
Contributor

Thank you for the improvement. It looks great, I only have a two small comments, on reusability of the handlers code and check of the hasPromise method.

@antonis antonis requested a review from krystofwoldrich May 19, 2025 15:17
Comment thread packages/core/src/js/integrations/reactnativeerrorhandlers.ts Outdated
@antonis antonis requested a review from krystofwoldrich May 20, 2025 10:56

@krystofwoldrich krystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@antonis antonis merged commit 5060f2d into main May 20, 2025
109 of 111 checks passed
@antonis antonis deleted the antonis/3957-hermes-rejection-tracker branch May 20, 2025 12:26
antonis added a commit to getsentry/sentry-docs that referenced this pull request Jul 3, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*

Adds unhandled promise rejection page to align with the new
implementation in
getsentry/sentry-react-native#4826 shipped in
`6.15.0`.

Fixes getsentry/sentry-react-native#4862

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)

---------

Co-authored-by: Karl Heinz Struggl <kahest@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Hermes Promise implementation instead of JS polyfill

3 participants