-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
[Android] TimeToInitialDisplay doesn't track Tab screens from react-navigation #3809
Comments
Hi @serzmerz, we will investigate it. Currently you can work around this by using the manual TTID instrumentation in the tabs. <Sentry.TimeToInitialDisplay record={true} /> |
Hello @krystofwoldrich, manual TTID instrumentation also doesn't work |
this happening because event will not be emitted from native side for android for tabs here https://github.com/getsentry/sentry-react-native/blob/main/src/js/tracing/reactnavigation.ts#L236 |
@serzmerz Thank you for the details. If I understand this correctly the native events (https://github.com/getsentry/sentry-react-native/blob/main/src/js/tracing/reactnavigation.ts?rgh-link-date=2024-05-10T12%3A31%3A17Z#L236) are also not emitting for the manual instrumentation? |
yes, for some reason is not emitted with manual instrumentation as well |
Could you confirm does it happen both in emulator and on device? |
Good catch, I checked on real device and manual instrumentation works, thanks.
|
Also, I'm checking With that I managed to record both: initial and full display on the tab |
Thank you for the confirmation. |
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)react-native-sentry
(<= 0.43.2)SDK version: 5.22.2
react-native
version: 0.73.6Are you using Expo?
Are you using sentry.io or on-premise?
If you are using sentry.io, please post a link to your issue so we can take a look:
[Link to issue]
Configuration:
(
@sentry/react-native
)I have the following issue:
On Android, when
enableTimeToInitialDisplay
flag is active, sentry doesn't capture initial time on screens from Tab navigator (react-navigation). It is happening in@sentry/react-native/android/src/main/java/io/sentry/react/RNSentryReactFragmentLifecycleTracer.java
because:com.swmansion.rnscreens.ScreenFragment
, notcom.swmansion.rnscreens.ScreenStackFragment
and it doesnt subscribe toeventDispatcher
.com.swmansion.rnscreens.events.ScreenAppearEvent
event, since this event(transitionEnd) only available for Stack screens.My navigation setup is next: Root stack navigator and one of the screens is TabNavigator
Steps to reproduce:
Actual result:
On android you will get
deadline_exceeded
forui.load.initial_display
span. (Note: first default screen will be reported correctly, since router fireScreenAppearEvent
for this stack screen). It works as expected on ios with both tab and stack screens.Expected result:
ui.load.initial_display
span captured correctly for tab screens for AndroidNext steps:
Have you considered any other options how to trigger navigation end for tab screens? Maybe you know any workarounds?
I can help investigate or provide demo if it will be helpful.
Tabs usually is the most heaviest screens, so we would like to track performance of them, especially for android(which is more slower platform for our app)
The text was updated successfully, but these errors were encountered: