Skip to content

Kw/app start span for hybrid SDKs#3454

Merged
krystofwoldrich merged 8 commits into
mainfrom
kw/appStartSpanForHybridSDKs
Jun 4, 2024
Merged

Kw/app start span for hybrid SDKs#3454
krystofwoldrich merged 8 commits into
mainfrom
kw/appStartSpanForHybridSDKs

Conversation

@krystofwoldrich

@krystofwoldrich krystofwoldrich commented Jun 3, 2024

Copy link
Copy Markdown
Contributor

📜 Description

This PR adds a new method to the HybridSDKs interface which returns serializable app start data including span structures.

This can be used in Flutter (replacing current custom impl), React Native and other hybrid SDKs like Unity, Capacitor and others.

💡 Motivation and Context

💚 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

#skip-changelog

@github-actions

github-actions Bot commented Jun 3, 2024

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 389.53 ms 468.83 ms 79.30 ms
Size 1.70 MiB 2.28 MiB 592.12 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d6d2b2e 392.55 ms 467.50 ms 74.95 ms
c7e2fbc 393.98 ms 478.24 ms 84.27 ms
4e260b3 388.40 ms 468.98 ms 80.58 ms
28c9a83 366.20 ms 433.88 ms 67.67 ms
baaf637 418.39 ms 496.86 ms 78.47 ms
283d83e 416.81 ms 497.22 ms 80.41 ms
283d83e 348.44 ms 392.06 ms 43.62 ms
0bf143e 368.35 ms 437.47 ms 69.12 ms
86f0096 368.63 ms 446.92 ms 78.29 ms
619c9b9 428.23 ms 514.66 ms 86.43 ms

App size

Revision Plain With Sentry Diff
d6d2b2e 1.72 MiB 2.27 MiB 555.05 KiB
c7e2fbc 1.72 MiB 2.29 MiB 576.40 KiB
4e260b3 1.72 MiB 2.27 MiB 554.95 KiB
28c9a83 1.70 MiB 2.28 MiB 592.00 KiB
baaf637 1.72 MiB 2.27 MiB 558.42 KiB
283d83e 1.72 MiB 2.29 MiB 577.69 KiB
283d83e 1.72 MiB 2.29 MiB 577.69 KiB
0bf143e 1.72 MiB 2.29 MiB 576.50 KiB
86f0096 1.72 MiB 2.29 MiB 576.50 KiB
619c9b9 1.70 MiB 2.28 MiB 592.12 KiB

Previous results on branch: kw/appStartSpanForHybridSDKs

Startup times

Revision Plain With Sentry Diff
27c9de3 368.88 ms 473.28 ms 104.40 ms
c9f1bb9 417.57 ms 476.24 ms 58.67 ms
d52f826 430.57 ms 475.76 ms 45.19 ms

App size

Revision Plain With Sentry Diff
27c9de3 1.70 MiB 2.28 MiB 592.12 KiB
c9f1bb9 1.70 MiB 2.28 MiB 592.12 KiB
d52f826 1.70 MiB 2.28 MiB 592.12 KiB

@krystofwoldrich krystofwoldrich changed the title Kw/app start span for hybrid sd ks Kw/app start span for hybrid SDKs Jun 3, 2024
@krystofwoldrich
krystofwoldrich requested a review from buenaflor June 3, 2024 14:41
@krystofwoldrich

Copy link
Copy Markdown
Contributor Author

@buenaflor This the same app start helper as for iOS. Again, please review the code from Flutter point of view.

@markushi markushi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice one, looks good! Please have a look at my comments, especially the one about accepting only valid timespans.

Comment thread sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java Outdated
Comment thread sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java Outdated
@buenaflor

Copy link
Copy Markdown
Contributor

works on flutter 👍 looks good to me

@krystofwoldrich
krystofwoldrich merged commit 4fe50fc into main Jun 4, 2024
@krystofwoldrich
krystofwoldrich deleted the kw/appStartSpanForHybridSDKs branch June 4, 2024 14:03
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.

4 participants