Skip to content

Support sentry SDK Swift#5025

Merged
noahsmartin merged 5 commits into
mainfrom
sentrySDKSwift
Jul 28, 2025
Merged

Support sentry SDK Swift#5025
noahsmartin merged 5 commits into
mainfrom
sentrySDKSwift

Conversation

@noahsmartin

@noahsmartin noahsmartin commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

A few cleanups to how the SentrySDK APIs are called. The main change is moving them to an ObjectiveC file instead of an ObjectiveC++ file since it is now written in Swift and cannot be accessed in the ObjectiveC++ code. Also the category on SentrySDK that exposed captureEnvelope and storeEnvelope won't work anymore, those methods are removed. But since this PR: https://github.com/getsentry/sentry-react-native/pull/2303/files#diff-add4c17f9e3987271b5ca99f9a87cff1cd9adf9ffa5a599987d0ab3980990b25L296 they had been changed to use PrivateSentrySDKOnly, and the category was unused so I deleted it

#skip-changelog

@github-actions

github-actions Bot commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 461.30 ms 452.09 ms -9.21 ms
Size 17.75 MiB 20.15 MiB 2.41 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
9167f73 376.63 ms 384.86 ms 8.23 ms
7a4dd2b 438.83 ms 432.25 ms -6.58 ms
9e3030a 421.47 ms 418.65 ms -2.82 ms
f0b931f 447.12 ms 430.32 ms -16.80 ms
37f7d2e 409.88 ms 418.56 ms 8.68 ms
f25ae46 459.92 ms 451.78 ms -8.14 ms
c352c30 331.98 ms 321.78 ms -10.20 ms
7e38386 431.72 ms 416.34 ms -15.38 ms
bdb324a 422.22 ms 457.88 ms 35.65 ms
ed5d418 376.51 ms 380.43 ms 3.92 ms

App size

Revision Plain With Sentry Diff
9167f73 17.75 MiB 20.15 MiB 2.40 MiB
7a4dd2b 17.75 MiB 20.15 MiB 2.41 MiB
9e3030a 17.75 MiB 20.15 MiB 2.40 MiB
f0b931f 17.75 MiB 20.15 MiB 2.41 MiB
37f7d2e 17.75 MiB 20.15 MiB 2.41 MiB
f25ae46 17.75 MiB 20.15 MiB 2.40 MiB
c352c30 17.75 MiB 20.15 MiB 2.40 MiB
7e38386 17.75 MiB 20.15 MiB 2.41 MiB
bdb324a 17.75 MiB 20.15 MiB 2.40 MiB
ed5d418 17.75 MiB 20.15 MiB 2.41 MiB

Previous results on branch: sentrySDKSwift

Startup times

Revision Plain With Sentry Diff
2e6d648 415.06 ms 406.29 ms -8.77 ms

App size

Revision Plain With Sentry Diff
2e6d648 17.75 MiB 20.15 MiB 2.41 MiB

@github-actions

github-actions Bot commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 373.21 ms 405.64 ms 32.43 ms
Size 7.15 MiB 8.42 MiB 1.27 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
6e8a851+dirty 403.44 ms 430.87 ms 27.43 ms
9f3972e+dirty 370.67 ms 401.16 ms 30.49 ms
9f14d9d+dirty 421.40 ms 454.52 ms 33.12 ms
1633d3b+dirty 385.78 ms 452.61 ms 66.83 ms
ff0e5d8+dirty 485.70 ms 569.22 ms 83.52 ms
9167f73+dirty 372.49 ms 389.90 ms 17.41 ms
940bd65+dirty 408.45 ms 419.75 ms 11.30 ms
f76175c+dirty 354.23 ms 378.20 ms 23.97 ms
c352c30+dirty 396.83 ms 378.11 ms -18.72 ms
b4d6bde+dirty 390.51 ms 385.60 ms -4.91 ms

App size

Revision Plain With Sentry Diff
6e8a851+dirty 7.15 MiB 8.42 MiB 1.26 MiB
9f3972e+dirty 7.15 MiB 8.42 MiB 1.27 MiB
9f14d9d+dirty 7.15 MiB 8.42 MiB 1.27 MiB
1633d3b+dirty 7.15 MiB 8.42 MiB 1.27 MiB
ff0e5d8+dirty 7.15 MiB 8.42 MiB 1.27 MiB
9167f73+dirty 7.15 MiB 8.42 MiB 1.26 MiB
940bd65+dirty 7.15 MiB 8.42 MiB 1.26 MiB
f76175c+dirty 7.15 MiB 8.42 MiB 1.26 MiB
c352c30+dirty 7.15 MiB 8.42 MiB 1.26 MiB
b4d6bde+dirty 7.15 MiB 8.42 MiB 1.26 MiB

Previous results on branch: sentrySDKSwift

Startup times

Revision Plain With Sentry Diff
2e6d648+dirty 376.93 ms 441.04 ms 64.11 ms

App size

Revision Plain With Sentry Diff
2e6d648+dirty 7.15 MiB 8.42 MiB 1.27 MiB

@github-actions

github-actions Bot commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1208.24 ms 1223.84 ms 15.59 ms
Size 3.19 MiB 4.38 MiB 1.19 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e12044e+dirty 1234.49 ms 1228.85 ms -5.64 ms
d079998+dirty 1221.29 ms 1213.06 ms -8.22 ms
1633d3b+dirty 1221.20 ms 1217.70 ms -3.50 ms
26286ef+dirty 1207.33 ms 1202.27 ms -5.06 ms
d18ddb1+dirty 1200.88 ms 1214.57 ms 13.69 ms
6e8a851+dirty 1222.57 ms 1223.67 ms 1.10 ms
ffab994+dirty 1222.20 ms 1230.69 ms 8.49 ms
37f7d2e+dirty 1217.37 ms 1210.04 ms -7.32 ms
ba41c2a+dirty 1218.92 ms 1221.02 ms 2.10 ms
9f3972e+dirty 1217.65 ms 1229.96 ms 12.31 ms

App size

Revision Plain With Sentry Diff
e12044e+dirty 3.19 MiB 4.35 MiB 1.17 MiB
d079998+dirty 3.19 MiB 4.38 MiB 1.19 MiB
1633d3b+dirty 3.19 MiB 4.38 MiB 1.19 MiB
26286ef+dirty 3.19 MiB 4.36 MiB 1.17 MiB
d18ddb1+dirty 3.19 MiB 4.36 MiB 1.17 MiB
6e8a851+dirty 3.19 MiB 4.35 MiB 1.17 MiB
ffab994+dirty 3.19 MiB 4.36 MiB 1.18 MiB
37f7d2e+dirty 3.19 MiB 4.38 MiB 1.19 MiB
ba41c2a+dirty 3.19 MiB 4.36 MiB 1.17 MiB
9f3972e+dirty 3.19 MiB 4.38 MiB 1.19 MiB

Previous results on branch: sentrySDKSwift

Startup times

Revision Plain With Sentry Diff
2e6d648+dirty 1243.59 ms 1251.27 ms 7.68 ms

App size

Revision Plain With Sentry Diff
2e6d648+dirty 3.19 MiB 4.38 MiB 1.19 MiB

@github-actions

github-actions Bot commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1228.29 ms 1230.80 ms 2.51 ms
Size 2.63 MiB 3.81 MiB 1.18 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e12044e+dirty 1233.45 ms 1233.66 ms 0.21 ms
d079998+dirty 1238.08 ms 1234.39 ms -3.69 ms
1633d3b+dirty 1221.94 ms 1230.12 ms 8.18 ms
26286ef+dirty 1213.45 ms 1229.96 ms 16.51 ms
d18ddb1+dirty 1209.74 ms 1209.65 ms -0.10 ms
c352c30+dirty 1216.60 ms 1231.37 ms 14.77 ms
ffab994+dirty 1220.71 ms 1222.00 ms 1.29 ms
37f7d2e+dirty 1213.15 ms 1222.61 ms 9.46 ms
ba41c2a+dirty 1232.60 ms 1231.16 ms -1.44 ms
9f3972e+dirty 1231.12 ms 1242.46 ms 11.34 ms

App size

Revision Plain With Sentry Diff
e12044e+dirty 2.63 MiB 3.78 MiB 1.15 MiB
d079998+dirty 2.63 MiB 3.81 MiB 1.18 MiB
1633d3b+dirty 2.63 MiB 3.81 MiB 1.18 MiB
26286ef+dirty 2.63 MiB 3.80 MiB 1.17 MiB
d18ddb1+dirty 2.63 MiB 3.80 MiB 1.17 MiB
c352c30+dirty 2.63 MiB 3.78 MiB 1.15 MiB
ffab994+dirty 2.63 MiB 3.80 MiB 1.17 MiB
37f7d2e+dirty 2.63 MiB 3.81 MiB 1.18 MiB
ba41c2a+dirty 2.63 MiB 3.80 MiB 1.17 MiB
9f3972e+dirty 2.63 MiB 3.81 MiB 1.18 MiB

Previous results on branch: sentrySDKSwift

Startup times

Revision Plain With Sentry Diff
2e6d648+dirty 1218.83 ms 1232.73 ms 13.90 ms

App size

Revision Plain With Sentry Diff
2e6d648+dirty 2.63 MiB 3.81 MiB 1.18 MiB

Comment thread packages/core/ios/RNSentry.h Outdated

@antonis antonis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for your work on this @noahsmartin 🙇
Other than the minor lint issue the changes LGTM. I've also tested with the sample app and didn't notice any changes in the sdk behavior 🎉

Co-authored-by: Antonis Lilis <antonis.lilis@gmail.com>
Comment thread packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.m Outdated

@antonis antonis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🚀

@lucas-zimerman lucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@noahsmartin noahsmartin force-pushed the sentrySDKSwift branch 2 times, most recently from 1e4ce3b to de11152 Compare July 28, 2025 17:19
@noahsmartin noahsmartin merged commit 553e027 into main Jul 28, 2025
73 checks passed
@noahsmartin noahsmartin deleted the sentrySDKSwift branch July 28, 2025 20: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.

3 participants