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

Warm starts cleanup #3954

Open
wants to merge 6 commits into
base: fix/warm-starts
Choose a base branch
from
Open

Conversation

stefanosiano
Copy link
Member

📜 Description

  • moved activity lifecycle spans logic into a separate class ActivityLifecycleSpanHelper
  • moved processInitSpan creation to AppStartMetrics
  • ActivityLifecycleIntegration now create regular spans, and adds TimeSpans to AppStartMetrics to handle hybrid SDKs
  • PerformanceAndroidEventProcessor does not add activity lifecycle spans to the transaction, as they are added by ActivityLifecycleIntegration directly
  • removed activity callback from SentryPerformanceProvider

💡 Motivation and Context

Cleans some code after the warm start changes
I added a separate PR to avoid having too many logical changes in one

💚 How did you test it?

📝 Checklist

  • 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.
  • I updated the wizard 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

…fecycleSpanHelper

moved processInitSpan creation to AppStartMetrics
ActivityLifecycleIntegration now create regular spans, and adds TimeSpans to AppStartMetrics to handle hybrid SDKs
PerformanceAndroidEventProcessor does not add activity lifecycle spans to the transaction, as they are added by ActivityLifecycleIntegration directly
# Conflicts:
#	sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Copy link
Contributor

github-actions bot commented Dec 3, 2024

Fails
🚫 Please consider adding a changelog entry for the next release.

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

- Warm starts cleanup ([#3954](https://github.com/getsentry/sentry-java/pull/3954))

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 d0764bd

Copy link
Contributor

github-actions bot commented Dec 3, 2024

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java

Copy link
Contributor

github-actions bot commented Dec 5, 2024

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java

Copy link
Contributor

github-actions bot commented Dec 5, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 419.41 ms 429.41 ms 10.00 ms
Size 1.70 MiB 2.36 MiB 669.84 KiB

Baseline results on branch: fix/warm-starts

Startup times

Revision Plain With Sentry Diff
c21a34f 369.28 ms 441.12 ms 71.84 ms
34c4186 410.50 ms 437.28 ms 26.78 ms

App size

Revision Plain With Sentry Diff
c21a34f 1.70 MiB 2.36 MiB 669.76 KiB
34c4186 1.70 MiB 2.36 MiB 669.76 KiB

Previous results on branch: fix/warm-starts-cleanup

Startup times

Revision Plain With Sentry Diff
3c20f24 404.14 ms 488.88 ms 84.74 ms

App size

Revision Plain With Sentry Diff
3c20f24 1.70 MiB 2.36 MiB 669.84 KiB

@stefanosiano stefanosiano marked this pull request as ready for review December 5, 2024 12:17
Copy link
Contributor

github-actions bot commented Dec 5, 2024

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java

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