Skip to content

Conversation

@noahsmartin
Copy link
Contributor

This pulls all the internal code that doesn't really need to be part of SentryOptions into its own helper class. With this change the hybrid SDK options initialization logic goes through a static method on SentryOptionsInternal, so SentryOptions can be written in Swift without affecting the API that hybrid SDKs use.

While this doesn't change the public API, it does change the hybrid SDK from using [[SentryOptions alloc] initWithDict:dictionary didFailWithError:&error] to using [SentryOptionsInternal initWithDict:dictionary didFailWithError:&error] I will follow up with hybrid SDK PRs to make this change.

#skip-changelog

@codecov
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

Attention: Patch coverage is 99.67320% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.690%. Comparing base (b40b3af) to head (50d7bad).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
Sources/Sentry/SentyOptionsInternal.m 99.671% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5698       +/-   ##
=============================================
+ Coverage   86.564%   86.690%   +0.126%     
=============================================
  Files          421       422        +1     
  Lines        36054     36088       +34     
  Branches     15342     16974     +1632     
=============================================
+ Hits         31210     31285       +75     
+ Misses        4803      4760       -43     
- Partials        41        43        +2     
Files with missing lines Coverage Δ
Sources/Sentry/SentryOptions.m 98.045% <100.000%> (-0.790%) ⬇️
Sources/Sentry/SentrySDKInternal.m 88.084% <100.000%> (ø)
Sources/Sentry/SentyOptionsInternal.m 99.671% <99.671%> (ø)

... and 23 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b40b3af...50d7bad. Read the comment docs.

@noahsmartin noahsmartin force-pushed the sentryOptionsInternal branch 4 times, most recently from 8596808 to 0819ac2 Compare July 24, 2025 14:01
Copy link
Contributor

@itaybre itaybre left a comment

Choose a reason for hiding this comment

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

Looks good, but seems like it failed to build on Xcode 14

@noahsmartin noahsmartin force-pushed the sentryOptionsInternal branch from 0819ac2 to 4de6e54 Compare July 24, 2025 14:49
@noahsmartin noahsmartin force-pushed the sentryOptionsInternal branch from 4de6e54 to 50d7bad Compare July 24, 2025 15:57
@github-actions
Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1234.98 ms 1254.53 ms 19.55 ms
Size 23.75 KiB 906.02 KiB 882.27 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
2481950 1221.04 ms 1248.98 ms 27.94 ms
a9fac2e 1212.45 ms 1219.67 ms 7.22 ms
99104c9 1224.84 ms 1247.08 ms 22.24 ms
7148f97 1235.09 ms 1258.07 ms 22.98 ms
6279992 1213.60 ms 1241.38 ms 27.79 ms
aa96485 1215.37 ms 1234.04 ms 18.67 ms
fc0757d 1231.83 ms 1248.98 ms 17.15 ms
7c7ac56 1225.90 ms 1250.22 ms 24.33 ms
8e3a42f 1222.90 ms 1245.67 ms 22.77 ms
51f74d7 1236.31 ms 1247.43 ms 11.12 ms

App size

Revision Plain With Sentry Diff
2481950 23.74 KiB 872.74 KiB 849.00 KiB
a9fac2e 23.75 KiB 879.53 KiB 855.78 KiB
99104c9 23.75 KiB 894.83 KiB 871.09 KiB
7148f97 23.75 KiB 854.78 KiB 831.03 KiB
6279992 23.75 KiB 891.03 KiB 867.28 KiB
aa96485 23.75 KiB 874.46 KiB 850.71 KiB
fc0757d 23.75 KiB 850.73 KiB 826.98 KiB
7c7ac56 23.75 KiB 902.49 KiB 878.74 KiB
8e3a42f 23.75 KiB 880.06 KiB 856.31 KiB
51f74d7 23.74 KiB 874.08 KiB 850.34 KiB

@noahsmartin noahsmartin merged commit de86244 into main Jul 24, 2025
127 of 131 checks passed
@noahsmartin noahsmartin deleted the sentryOptionsInternal branch July 24, 2025 16:38
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
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.

3 participants