Skip to content
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

Adjust time-to-full-display span if reportFullDisplayed is called too early #2550

Merged
merged 3 commits into from
Feb 21, 2023

Conversation

stefanosiano
Copy link
Member

@stefanosiano stefanosiano commented Feb 17, 2023

📜 Description

time-to-full-display end timestamp is now adjusted to the time-to-initial-display end timestamp if called too early
added updateEndDate method to ISpan

💡 Motivation and Context

If the user calls the manual API Sentry.reportFullDisplayed too early, we would show the time-to-full-display span to be shorter than our automatically calculated time-to-initial-display, which would be pretty confusing.
This adjustment is done also by the Android system: If this method is called before the activity's window is first drawn and displayed as measured by the system, the reported time here will be shifted to the system measured time.
It's also done by the Firebase SDK.

💚 How did you test it?

Unit tests

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

ttfd end timestamp is now adjusted to the ttid end timestamp if called too early
@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2023

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 85cfb19

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 352.74 ms 379.26 ms 26.52 ms
Size 1.73 MiB 2.34 MiB 625.61 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
4b32504 315.69 ms 373.96 ms 58.27 ms
754021c 358.70 ms 361.98 ms 3.28 ms
c1399c1 345.06 ms 385.49 ms 40.43 ms
5fa24ec 326.29 ms 384.53 ms 58.24 ms
fe30606 310.82 ms 335.36 ms 24.55 ms
f6a135d 263.96 ms 383.59 ms 119.63 ms
14c083a 350.82 ms 388.86 ms 38.04 ms
4b32504 357.14 ms 404.04 ms 46.90 ms
fe30606 327.46 ms 351.74 ms 24.28 ms

App size

Revision Plain With Sentry Diff
4b32504 1.73 MiB 2.34 MiB 623.74 KiB
754021c 1.73 MiB 2.33 MiB 623.06 KiB
c1399c1 1.73 MiB 2.33 MiB 620.61 KiB
5fa24ec 1.73 MiB 2.33 MiB 620.61 KiB
fe30606 1.73 MiB 2.34 MiB 623.74 KiB
f6a135d 1.73 MiB 2.33 MiB 623.10 KiB
14c083a 1.73 MiB 2.33 MiB 620.61 KiB
4b32504 1.73 MiB 2.34 MiB 623.74 KiB
fe30606 1.73 MiB 2.34 MiB 623.74 KiB

Previous results on branch: feat/ttfd-adjusted-to-ttid

Startup times

Revision Plain With Sentry Diff
788858a 339.51 ms 379.63 ms 40.12 ms

App size

Revision Plain With Sentry Diff
788858a 1.73 MiB 2.34 MiB 625.70 KiB

@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Base: 80.25% // Head: 80.28% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (85cfb19) compared to base (efa7b3d).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2550      +/-   ##
============================================
+ Coverage     80.25%   80.28%   +0.03%     
- Complexity     3983     3990       +7     
============================================
  Files           327      327              
  Lines         15010    15017       +7     
  Branches       1977     1977              
============================================
+ Hits          12046    12057      +11     
+ Misses         2187     2183       -4     
  Partials        777      777              
Impacted Files Coverage Δ
sentry/src/main/java/io/sentry/NoOpSpan.java 24.13% <100.00%> (+2.70%) ⬆️
...entry/src/main/java/io/sentry/NoOpTransaction.java 23.80% <100.00%> (+1.85%) ⬆️
sentry/src/main/java/io/sentry/SentryTracer.java 91.98% <100.00%> (+0.03%) ⬆️
sentry/src/main/java/io/sentry/Span.java 92.00% <100.00%> (+0.33%) ⬆️
sentry/src/main/java/io/sentry/Sentry.java 56.08% <0.00%> (+1.05%) ⬆️
sentry/src/main/java/io/sentry/HubAdapter.java 9.23% <0.00%> (+3.07%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@stefanosiano stefanosiano marked this pull request as ready for review February 17, 2023 17:03
Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

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

Nice one, looks good!

@stefanosiano stefanosiano merged commit b992ebb into main Feb 21, 2023
@stefanosiano stefanosiano deleted the feat/ttfd-adjusted-to-ttid branch February 21, 2023 08:44
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.

None yet

2 participants