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

Slow and frozen frames + frame delay for Spans #3081

Closed
wants to merge 30 commits into from

Conversation

markushi
Copy link
Member

@markushi markushi commented Dec 4, 2023

📜 Description

As discussed we want to move away from ActivityFramesTracker and use our SentryFrameMetricsCollector instead.

This class extends the DefaultTransactionPerformanceCollector to support collecting snapshots (existing impl for polling cpu/memory every 100ms) as well as in a "continuous" fashion, for slow and frozen frames.

Steps taken:

  1. Added frame delay to SentryFrameMetricsCollector
  2. Have a single SentryFrameMetricsCollector object, living in SentryAndroidOptions
  3. Added IPerformanceCollectorInterface with IPerformanceSnapshotCollector (previously ICollector) and IPerformanceContinuousCollector sub interfaces
  4. Extended DefaultTransactionPerformanceCollector to support both interfaces
  5. Added AndroidSlowFrozenFrameCollector which collects and aggregates the frame metrics for every span

Still Missing:

  1. AndroidSlowFrozenFrameCollector aggregation logic
  2. Tests

💚 How did you test it?

TBD

📝 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

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Slow and frozen frames + frame delay for Spans ([#3081](https://github.com/getsentry/sentry-java/pull/3081))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against bb09cdf

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 361.56 ms 399.40 ms 37.84 ms
Size 1.72 MiB 2.27 MiB 557.89 KiB

Baseline results on branch: feat/app-start-spans

Startup times

Revision Plain With Sentry Diff
3fd1e60 390.54 ms 446.90 ms 56.36 ms
6cd4f31 389.94 ms 445.81 ms 55.87 ms
5f1218e 408.20 ms 466.26 ms 58.06 ms

App size

Revision Plain With Sentry Diff
3fd1e60 1.72 MiB 2.27 MiB 557.21 KiB
6cd4f31 1.72 MiB 2.27 MiB 557.15 KiB
5f1218e 1.72 MiB 2.29 MiB 580.44 KiB

Previous results on branch: feat/slow-frozen-frames

Startup times

Revision Plain With Sentry Diff
5362676 411.22 ms 549.20 ms 137.98 ms

App size

Revision Plain With Sentry Diff
5362676 1.72 MiB 2.27 MiB 557.84 KiB

Base automatically changed from feat/app-start-spans to main December 13, 2023 12:14
Align with iOS behavior, making it possible to attach span information
within the onSpanFinished callback
@markushi
Copy link
Member Author

Closing in favor of multiple smaller PRs

@markushi markushi closed this Dec 18, 2023
@markushi markushi deleted the feat/slow-frozen-frames branch March 5, 2024 14:27
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.

2 participants