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

Trim time-to-full-display span if reportFullyDisplayed API is never called #2631

Merged
merged 6 commits into from
Mar 30, 2023

Conversation

stefanosiano
Copy link
Member

📜 Description

ttfd span is trimmed if reportFullyDisplayed API is never called
exposed getFinishDate internally in ISpan

💡 Motivation and Context

Currently if the user enables the option to track the fullDisplay, the transaction keeps running and if the manual API is never called, the time-to-full-display span would always last 30 seconds, increasing the transaction duration.
This change aims to mitigate this issue, so that if no other spans are present, the total transaction duration would be until the time-to-initial-display span is finished.

💚 How did you test it?

Unit test

📝 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

@stefanosiano stefanosiano marked this pull request as ready for review March 29, 2023 09:27
@github-actions
Copy link
Contributor

github-actions bot commented Mar 29, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 316.84 ms 346.52 ms 29.68 ms
Size 1.73 MiB 2.26 MiB 551.46 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d81684e 235.73 ms 328.76 ms 93.03 ms
17ab223 427.65 ms 484.31 ms 56.65 ms

App size

Revision Plain With Sentry Diff
d81684e 1.73 MiB 2.26 MiB 547.78 KiB
17ab223 1.73 MiB 2.34 MiB 626.85 KiB

Previous results on branch: fix/ttfd-trim

Startup times

Revision Plain With Sentry Diff
db2ee95 289.47 ms 359.70 ms 70.23 ms

App size

Revision Plain With Sentry Diff
db2ee95 1.73 MiB 2.26 MiB 549.71 KiB

@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (7b0f520) 81.37% compared to head (54f7e61) 81.37%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2631   +/-   ##
=========================================
  Coverage     81.37%   81.37%           
- Complexity     4219     4221    +2     
=========================================
  Files           337      337           
  Lines         15599    15601    +2     
  Branches       2037     2037           
=========================================
+ Hits          12693    12695    +2     
  Misses         2111     2111           
  Partials        795      795           
Impacted Files Coverage Δ
sentry/src/main/java/io/sentry/SentryTracer.java 94.14% <ø> (ø)
sentry/src/main/java/io/sentry/Span.java 89.70% <ø> (ø)
sentry/src/main/java/io/sentry/NoOpSpan.java 27.27% <100.00%> (+2.27%) ⬆️
...entry/src/main/java/io/sentry/NoOpTransaction.java 26.08% <100.00%> (+1.64%) ⬆️

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

LGTM!

aligned with cocoa for " - Deadline Exceeded" suffix
aligned with cocoa for " - Deadline Exceeded" suffix
@stefanosiano stefanosiano merged commit 9a46975 into main Mar 30, 2023
@stefanosiano stefanosiano deleted the fix/ttfd-trim branch March 30, 2023 11:42
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