TimeToDisplay: No active span found to attach ui.load.full_display to
OS:
- [ ] Windows
- [x] MacOS
- [ ] Linux
Platform:
- [ ] iOS
- [x] Android
SDK:
- [x]
@sentry/react-native(>= 1.0.0) - [ ]
react-native-sentry(<= 0.43.2)
SDK version: 5.22.2
react-native version: 0.69.9
Are you using Expo?
- [x] Yes
- [ ] No
Are you using sentry.io or on-premise?
- [ ] sentry.io (SaaS)
- [x] 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)
const routingInstrumentation = new Sentry.ReactNavigationInstrumentation({
enableTimeToInitialDisplay: true
});
Sentry.init(
createSentryConfigMobile({
dsn: Config.REACT_APP_SENTRY_DSN,
tracesSampleRate: 1,
sampleRate: 1,
environment: "development",
release: nativeAppVersion,
dist: DeviceInfo.getBuildNumber(),
attachStacktrace: true,
enableAutoPerformanceTracing: true,
enabled: !__DEV__,
debug: true,
integrations: [
new Sentry.ReactNativeTracing({
routingInstrumentation,
enableStallTracking: true,
enableAppStartTracking: true,
enableNativeFramesTracking: true
})
]
})
);
I have the following issue:
We tried to setup Time To Display while updating to sentry v5. For TTFD, we added it to few screens but we're getting following error on debug build. Seems like it's capturing the time to full display but unable to attach the metric to the associated screen. Tried to search the warning, but no luck. We're using @react-navigation/[email protected]. How can we resolve this warning?
import * as Sentry from "@sentry/react-native";
...
const isScreenFullyInteractive = useMemo(() => {
return !assetsLoading && !currenciesLoading;
}, [assetsLoading, currenciesLoading]);
...
return (
<View>
<Sentry.TimeToFullDisplay record={isScreenFullyInteractive} />
...
</View>
)
Logs
LOG Sentry Logger [log]: [TouchEvents] Touch event within element: View
LOG Sentry Logger [log]: [Tracing] starting navigation.processing transaction - Navigation processing
DEBUG Sentry Logger [debug]: [TimeToDisplay] onDrawNextFrame: {"newFrameTimestampInSeconds":1716290682.793,"type":"fullDisplay"}
WARN Sentry Logger [warn]: [TimeToDisplay] No active span found to attach ui.load.full_display to.
Steps to reproduce:
- Step 1
- Step 2
Actual result:
[Actual result]
Expected result:
[Expected result]