Skip to content

feat(experimental): Add native startWithConfigureOptions for Apple platforms #4444

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

Merged

Conversation

krystofwoldrich
Copy link
Contributor

@krystofwoldrich krystofwoldrich commented Jan 14, 2025

📢 Type of change

  • New feature

📜 Description

This PR adds RNSentrySDK.startWithConfigureOptions public method for initializing RNSentry.

This method should be used in RN application where the developer wants to manually initialize the native SDK. This is drop in replacement from SentrySDK.startWithConfigureOptions exposed by sentry-cocoa. The reason to use RNSentrySDK to initialize the SDK is user convenience as this automatically applies sensible default for RN application.

This is an intermediate step towards initializing from RNSentry from sentry.options.json.

💡 Motivation and Context

💚 How did you test it?

sample app, unit tests

📝 Checklist

  • I added tests to verify 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.
  • All tests passing
  • No breaking changes

🔮 Next steps

Copy link
Contributor

github-actions bot commented Jan 14, 2025

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

Generated by 🚫 dangerJS against 6c1ca89

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 339.87 ms 333.56 ms -6.31 ms
Size 17.75 MiB 20.11 MiB 2.37 MiB

Baseline results on branch: kw-ref-ios-sdk-init

Startup times

Revision Plain With Sentry Diff
650ad89 448.65 ms 437.68 ms -10.97 ms
aca58c3 466.10 ms 450.37 ms -15.73 ms
6326ab7 445.10 ms 434.72 ms -10.39 ms

App size

Revision Plain With Sentry Diff
650ad89 17.75 MiB 20.11 MiB 2.36 MiB
aca58c3 17.75 MiB 20.11 MiB 2.36 MiB
6326ab7 17.75 MiB 20.11 MiB 2.37 MiB

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 396.44 ms 451.40 ms 54.96 ms
Size 7.15 MiB 8.38 MiB 1.23 MiB

Baseline results on branch: capture-app-start-errors

Startup times

Revision Plain With Sentry Diff
208f4af+dirty 346.93 ms 402.77 ms 55.84 ms

App size

Revision Plain With Sentry Diff
208f4af+dirty 7.15 MiB 8.38 MiB 1.23 MiB

Previous results on branch: kw-add-react-native-ios-manual-init

Startup times

Revision Plain With Sentry Diff
a1ab76a+dirty 412.92 ms 538.19 ms 125.27 ms

App size

Revision Plain With Sentry Diff
a1ab76a+dirty 7.15 MiB 8.38 MiB 1.23 MiB

Copy link
Contributor

github-actions bot commented Jan 14, 2025

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1240.90 ms 1247.31 ms 6.41 ms
Size 2.63 MiB 3.69 MiB 1.05 MiB

Baseline results on branch: capture-app-start-errors

Startup times

Revision Plain With Sentry Diff
208f4af+dirty 1209.44 ms 1217.13 ms 7.70 ms

App size

Revision Plain With Sentry Diff
208f4af+dirty 2.63 MiB 3.69 MiB 1.05 MiB

Previous results on branch: kw-add-react-native-ios-manual-init

Startup times

Revision Plain With Sentry Diff
a1ab76a+dirty 1230.51 ms 1223.85 ms -6.66 ms

App size

Revision Plain With Sentry Diff
a1ab76a+dirty 2.63 MiB 3.69 MiB 1.05 MiB

Copy link
Contributor

github-actions bot commented Jan 14, 2025

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1209.74 ms 1217.02 ms 7.28 ms
Size 3.19 MiB 4.25 MiB 1.06 MiB

Baseline results on branch: capture-app-start-errors

Startup times

Revision Plain With Sentry Diff
208f4af+dirty 1213.08 ms 1223.82 ms 10.73 ms

App size

Revision Plain With Sentry Diff
208f4af+dirty 3.19 MiB 4.25 MiB 1.06 MiB

Previous results on branch: kw-add-react-native-ios-manual-init

Startup times

Revision Plain With Sentry Diff
a1ab76a+dirty 1220.98 ms 1219.06 ms -1.92 ms

App size

Revision Plain With Sentry Diff
a1ab76a+dirty 3.19 MiB 4.25 MiB 1.06 MiB

@krystofwoldrich krystofwoldrich marked this pull request as ready for review January 21, 2025 16:17
Base automatically changed from kw-ref-ios-sdk-init to capture-app-start-errors January 21, 2025 16:22
Copy link
Collaborator

@antonis antonis left a comment

Choose a reason for hiding this comment

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

LGMT and worked as expected with the sample app 🚀
Thank you for the added tests 🙇

@krystofwoldrich krystofwoldrich merged commit 7144a64 into capture-app-start-errors Jan 22, 2025
65 of 66 checks passed
@krystofwoldrich krystofwoldrich deleted the kw-add-react-native-ios-manual-init branch January 22, 2025 13:24
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