Auto Time to Initial Display for React Navigation is always 15 seconds
Description
On some Android devices the auto instrumentation for time to initial display results in heartbeat timeout and the TTID span is always 15 seconds.
To avoid this bug you can you the manual instrumentation <Sentry.TimeToInitialDisplay record={true} />
https://docs.sentry.io/platforms/react-native/performance/instrumentation/time-to-display/
- Example of this behaviour from a user report https://github.com/getsentry/sentry-react-native/issues/3847
Moving the discussion to this thread, as you asked in the issue, I was using only real devices for those tests, and my navigators are structured like this:
Stack Navigator (root)
└─ Tab Navigator
└─ Stack Navigator
Tbh I didn't know we also could define the TimeToInitialDisplay the same way you can with the TimeToFullDisplay, I was relying only on auto instrumentation for that. I'll add it and see if it solves the issue.
@matheuscouto Thank you for the details.
Just dropping a note here that we have at least one more instance of this reported on another channel
It seems that manually using <Sentry.TimeToInitialDisplay record={true} /> is helping.
But for screens without that, we're seeing those 15s TTID and TTFD even with enableTimeToInitialDisplay: false.
Is there a way to ignore/filter-out those 15s TTID and TTFD spans?
Hi @sregg, thank you for confirming that the manual instrumentation works.
But for screens without that, we're seeing those 15s TTID and TTFD even with enableTimeToInitialDisplay: false.
Are those possibly from old releases? Or do you see it when testing locally?
Are those possibly from old releases? Or do you see it when testing locally?
Locally. Even when we instrument manually a screen properly, we see the 15s timeout when navigating back to that screen. Tests are on iOS.
Thank you for the explanation @sregg
Thank you for the explanation @sregg
I'm happy to jump on a quick call to show you how this Time to Display is working in our app. There seems to be a few bugs at the moment.
Thank you,
we are currently working on a fix -> https://github.com/getsentry/sentry-react-native/pull/4042,
let's wait for it.