sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

Auto Time to Initial Display for React Navigation is always 15 seconds

Open krystofwoldrich opened this issue 1 year ago • 10 comments

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/

krystofwoldrich avatar Apr 29 '24 13:04 krystofwoldrich

  • Example of this behaviour from a user report https://github.com/getsentry/sentry-react-native/issues/3847

krystofwoldrich avatar Jun 03 '24 07:06 krystofwoldrich

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 avatar Jun 03 '24 12:06 matheuscouto

@matheuscouto Thank you for the details.

krystofwoldrich avatar Jun 06 '24 11:06 krystofwoldrich

Just dropping a note here that we have at least one more instance of this reported on another channel

kahest avatar Jul 29 '24 13:07 kahest

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?

sregg avatar Aug 29 '24 20:08 sregg

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?

krystofwoldrich avatar Sep 02 '24 13:09 krystofwoldrich

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.

sregg avatar Sep 02 '24 13:09 sregg

Thank you for the explanation @sregg

krystofwoldrich avatar Sep 03 '24 11:09 krystofwoldrich

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.

sregg avatar Sep 03 '24 11:09 sregg

Thank you,

we are currently working on a fix -> https://github.com/getsentry/sentry-react-native/pull/4042,

let's wait for it.

krystofwoldrich avatar Sep 04 '24 09:09 krystofwoldrich