-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: Add a wrapper around performance for React Native #2915
Conversation
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.
Happy this addressed the issue but sounds like a big in RN.
Is it the case? If so, is it tracked on their repo?
From my investigation, no, I should make an issue there later today. |
size-limit report
|
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.
Thanks @jennmueng. This is fine to unblock RN. Long term (which I hope will be soon) I want to address #2590 and this patch should become unnecessary 🤞 .
Thanks for this fix! In our experience with deploying a React Native app on mobile devices in the real world, any attempt to find an absolute time reference has been very unreliable. So I don't mind that you are calculating and storing an offset. |
Hey, I am using Expo to react-native project. After today update I noticed an exception in
Does anyone know if |
@fedyk It isn't available until |
Calling
performance.now()
in React Native seems to include some large offset even though it is relatively precise. This causes gigantic timestamp jumps in React Native, along with breadcrumbs being completely out of order.This is solved by having a unique wrapper for performance on React Native. The initial offset is set at the start, and any subsequent calls to
performance.now()
will have the offset subtracted. This solution should work short of finding the source of this offset and submitting a PR to React Native; even if it does eventually get fixed, this solution should still work as the initial offset would then be 0 or close to 0.https://sentry.slack.com/archives/C01354JB6ES/p1600273809119300
Related Issues:
#2590
getsentry/sentry-react-native#1004
Asana Task:
https://app.asana.com/0/1163978839534255/1193837000315289/f