Skip to content

fix(tracing): Time To Initial Display / Time To Full Display: remove warning that it's unsupported #5081

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alwx
Copy link
Contributor

@alwx alwx commented Aug 14, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Partially fixes #4705

📜 Description

  1. Even though in the docs we clearly state that TTID/TTFD is not supported, apparently it works if you disable all the checks in the SDK. I suspect it works since this PR got merged: 001 fix(ttd): Add TimeToDisplay integration to force fetch the data #4669
  2. However, it is NOT packed as a Turbo Module which means all the standard disadvantages like extra overhead and higher latency due to serialization/deserialization and native modules being loaded into memory during app startup.

The solution for now is the following: we can now remove the checks in the SDK and basically make it work with the new architecture. However, we will need to implement TTID/TTFD as turbo modules to make it more efficient: #4705

Here is the corresponding docs change: getsentry/sentry-docs#14662

💡 Motivation and Context

This change is needed to not show message that it's not supported because it actually is supported :)

💚 How did you test it?

With the sample app:

Screenshot 2025-08-14 at 12 13 53

(not all the results are there because I did experiment with <Sentry.TimeToInitialDisplay /> and <Sentry.TimeToFullDisplay /> wrapper components on individual screens)

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

Copy link
Contributor

github-actions bot commented Aug 14, 2025

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 438.04 ms 475.50 ms 37.46 ms
Size 17.75 MiB 20.15 MiB 2.41 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
64cd15c 439.02 ms 427.63 ms -11.39 ms
7be1f99 454.83 ms 461.36 ms 6.53 ms
e2fa43d 451.68 ms 462.42 ms 10.74 ms
3e0a5f9 401.72 ms 394.98 ms -6.74 ms
d916aa3 425.37 ms 427.02 ms 1.65 ms
785ffb1 471.92 ms 460.96 ms -10.96 ms
534ba8c 484.00 ms 499.93 ms 15.93 ms
eb07ba3 470.04 ms 473.35 ms 3.31 ms

App size

Revision Plain With Sentry Diff
64cd15c 17.75 MiB 20.15 MiB 2.41 MiB
7be1f99 17.75 MiB 20.15 MiB 2.41 MiB
e2fa43d 17.75 MiB 20.15 MiB 2.41 MiB
3e0a5f9 17.75 MiB 20.15 MiB 2.41 MiB
d916aa3 17.75 MiB 20.15 MiB 2.41 MiB
785ffb1 17.75 MiB 20.15 MiB 2.41 MiB
534ba8c 17.75 MiB 20.15 MiB 2.41 MiB
eb07ba3 17.75 MiB 20.15 MiB 2.41 MiB

@alwx alwx changed the title WIP: Time To Initial Display / Time To Full Display: remove warning that it's unsupported Time To Initial Display / Time To Full Display: remove warning that it's unsupported Aug 14, 2025
@alwx alwx marked this pull request as ready for review August 14, 2025 10:44
Copy link
Contributor

github-actions bot commented Aug 14, 2025

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 376.83 ms 426.50 ms 49.67 ms
Size 7.15 MiB 8.42 MiB 1.27 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
3e0a5f9+dirty 379.92 ms 450.96 ms 71.04 ms
d916aa3+dirty 411.72 ms 451.76 ms 40.03 ms
785ffb1+dirty 380.65 ms 451.83 ms 71.18 ms
534ba8c+dirty 472.35 ms 537.31 ms 64.96 ms
7be1f99+dirty 369.02 ms 399.60 ms 30.58 ms
64cd15c+dirty 488.79 ms 483.54 ms -5.24 ms
eb07ba3+dirty 419.49 ms 482.12 ms 62.63 ms
e2fa43d+dirty 326.56 ms 372.88 ms 46.32 ms

App size

Revision Plain With Sentry Diff
3e0a5f9+dirty 7.15 MiB 8.42 MiB 1.27 MiB
d916aa3+dirty 7.15 MiB 8.42 MiB 1.27 MiB
785ffb1+dirty 7.15 MiB 8.42 MiB 1.27 MiB
534ba8c+dirty 7.15 MiB 8.42 MiB 1.27 MiB
7be1f99+dirty 7.15 MiB 8.42 MiB 1.27 MiB
64cd15c+dirty 7.15 MiB 8.42 MiB 1.27 MiB
eb07ba3+dirty 7.15 MiB 8.42 MiB 1.27 MiB
e2fa43d+dirty 7.15 MiB 8.42 MiB 1.27 MiB

Copy link
Contributor

github-actions bot commented Aug 14, 2025

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1241.51 ms 1236.36 ms -5.15 ms
Size 2.63 MiB 3.81 MiB 1.18 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d916aa3+dirty 1221.02 ms 1228.98 ms 7.96 ms
534ba8c+dirty 1230.22 ms 1231.18 ms 0.96 ms
64cd15c+dirty 1216.31 ms 1214.04 ms -2.26 ms
785ffb1+dirty 1237.63 ms 1240.50 ms 2.87 ms
3e0a5f9+dirty 1226.94 ms 1230.02 ms 3.08 ms
eb07ba3+dirty 1222.46 ms 1220.37 ms -2.08 ms
7be1f99+dirty 1226.69 ms 1217.76 ms -8.93 ms
e2fa43d+dirty 1216.04 ms 1232.65 ms 16.61 ms

App size

Revision Plain With Sentry Diff
d916aa3+dirty 2.63 MiB 3.81 MiB 1.18 MiB
534ba8c+dirty 2.63 MiB 3.81 MiB 1.18 MiB
64cd15c+dirty 2.63 MiB 3.81 MiB 1.18 MiB
785ffb1+dirty 2.63 MiB 3.81 MiB 1.18 MiB
3e0a5f9+dirty 2.63 MiB 3.81 MiB 1.18 MiB
eb07ba3+dirty 2.63 MiB 3.81 MiB 1.18 MiB
7be1f99+dirty 2.63 MiB 3.81 MiB 1.18 MiB
e2fa43d+dirty 2.63 MiB 3.81 MiB 1.18 MiB

Copy link
Contributor

github-actions bot commented Aug 14, 2025

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1230.41 ms 1236.94 ms 6.53 ms
Size 3.19 MiB 4.38 MiB 1.19 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d916aa3+dirty 1211.02 ms 1221.33 ms 10.31 ms
534ba8c+dirty 1225.00 ms 1237.43 ms 12.43 ms
64cd15c+dirty 1213.50 ms 1223.54 ms 10.04 ms
785ffb1+dirty 1213.71 ms 1213.37 ms -0.35 ms
3e0a5f9+dirty 1233.65 ms 1239.10 ms 5.45 ms
eb07ba3+dirty 1214.49 ms 1221.59 ms 7.10 ms
7be1f99+dirty 1222.43 ms 1217.15 ms -5.28 ms
e2fa43d+dirty 1224.43 ms 1235.40 ms 10.98 ms

App size

Revision Plain With Sentry Diff
d916aa3+dirty 3.19 MiB 4.38 MiB 1.19 MiB
534ba8c+dirty 3.19 MiB 4.38 MiB 1.19 MiB
64cd15c+dirty 3.19 MiB 4.38 MiB 1.19 MiB
785ffb1+dirty 3.19 MiB 4.38 MiB 1.19 MiB
3e0a5f9+dirty 3.19 MiB 4.38 MiB 1.19 MiB
eb07ba3+dirty 3.19 MiB 4.38 MiB 1.19 MiB
7be1f99+dirty 3.19 MiB 4.38 MiB 1.19 MiB
e2fa43d+dirty 3.19 MiB 4.38 MiB 1.19 MiB

@alwx alwx force-pushed the alwx/improvement/ttid-ttfd branch from 44835d8 to dcf217c Compare August 14, 2025 13:25
@alwx alwx changed the title Time To Initial Display / Time To Full Display: remove warning that it's unsupported fix(tracing): Time To Initial Display / Time To Full Display: remove warning that it's unsupported Aug 14, 2025

expect(logger.warn).toHaveBeenCalledWith(
'TimeToInitialDisplay and TimeToFullDisplay are not supported on the web, Expo Go and New Architecture. Run native build or report an issue at https://github.com/getsentry/sentry-react-native');
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: My understanding is that the existing tests already cover both architectures. Is that the case or we are planning to add more?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antonis yes, existing tests are architecture-independent — they are basically UI tests that render components, mock certain behavior and verify spans after that.

@alwx alwx requested a review from antonis August 14, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement TTID/TTFD as Turbo Modules
2 participants