Skip to content

feat: Add experimental flag enableUnhandledCPPExceptionsV2 on iOS #4975

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

antonis
Copy link
Collaborator

@antonis antonis commented Jul 7, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Add experimental flag enableUnhandledCPPExceptionsV2 on iOS that provides a more reliable way to report unhandled C++ exceptions in iOS.

💡 Motivation and Context

Fixes #4966

💚 How did you test it?

Manual, CI

📝 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 Jul 7, 2025

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

Generated by 🚫 dangerJS against e2bdce7

Copy link
Contributor

github-actions bot commented Jul 7, 2025

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 413.33 ms 394.02 ms -19.31 ms
Size 17.75 MiB 20.15 MiB 2.40 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d18ddb1 427.06 ms 438.23 ms 11.17 ms
ec2a485 450.84 ms 447.49 ms -3.35 ms
f25ae46 459.92 ms 451.78 ms -8.14 ms
398e5d0 432.76 ms 423.80 ms -8.96 ms
7d3c3cb 444.85 ms 456.65 ms 11.81 ms
df5da5d 425.55 ms 432.96 ms 7.41 ms
bdb324a 422.22 ms 457.88 ms 35.65 ms
4e2cbd2 427.50 ms 462.78 ms 35.28 ms
940bd65 466.31 ms 458.52 ms -7.79 ms
6e8a851 425.59 ms 433.51 ms 7.92 ms

App size

Revision Plain With Sentry Diff
d18ddb1 17.75 MiB 20.15 MiB 2.40 MiB
ec2a485 17.75 MiB 20.15 MiB 2.40 MiB
f25ae46 17.75 MiB 20.15 MiB 2.40 MiB
398e5d0 17.75 MiB 20.15 MiB 2.40 MiB
7d3c3cb 17.75 MiB 20.15 MiB 2.40 MiB
df5da5d 17.75 MiB 20.15 MiB 2.40 MiB
bdb324a 17.75 MiB 20.15 MiB 2.40 MiB
4e2cbd2 17.75 MiB 20.15 MiB 2.40 MiB
940bd65 17.75 MiB 20.15 MiB 2.40 MiB
6e8a851 17.75 MiB 20.15 MiB 2.40 MiB

Copy link
Contributor

github-actions bot commented Jul 7, 2025

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1203.55 ms 1222.81 ms 19.26 ms
Size 2.63 MiB 3.80 MiB 1.17 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
940bd65+dirty 1216.88 ms 1225.23 ms 8.35 ms
8bd8033+dirty 1213.33 ms 1220.88 ms 7.55 ms
38a1af2+dirty 1210.07 ms 1212.75 ms 2.68 ms
0e42017+dirty 1225.89 ms 1231.63 ms 5.74 ms
c352c30+dirty 1216.60 ms 1231.37 ms 14.77 ms
26286ef+dirty 1213.45 ms 1229.96 ms 16.51 ms
866f143+dirty 1222.02 ms 1232.04 ms 10.02 ms
1a14c8b+dirty 1213.39 ms 1207.80 ms -5.60 ms
4e2cbd2+dirty 1223.00 ms 1236.12 ms 13.12 ms
df5da5d+dirty 1235.98 ms 1243.41 ms 7.43 ms

App size

Revision Plain With Sentry Diff
940bd65+dirty 2.63 MiB 3.78 MiB 1.15 MiB
8bd8033+dirty 2.63 MiB 3.78 MiB 1.15 MiB
38a1af2+dirty 2.63 MiB 3.79 MiB 1.15 MiB
0e42017+dirty 2.63 MiB 3.78 MiB 1.15 MiB
c352c30+dirty 2.63 MiB 3.78 MiB 1.15 MiB
26286ef+dirty 2.63 MiB 3.80 MiB 1.17 MiB
866f143+dirty 2.63 MiB 3.80 MiB 1.17 MiB
1a14c8b+dirty 2.63 MiB 3.80 MiB 1.17 MiB
4e2cbd2+dirty 2.63 MiB 3.79 MiB 1.15 MiB
df5da5d+dirty 2.63 MiB 3.78 MiB 1.15 MiB

Copy link
Contributor

github-actions bot commented Jul 7, 2025

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 349.29 ms 402.20 ms 52.90 ms
Size 7.15 MiB 8.42 MiB 1.26 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
df5da5d+dirty 415.54 ms 456.96 ms 41.42 ms
7d3c3cb+dirty 395.20 ms 413.24 ms 18.04 ms
1a14c8b+dirty 412.18 ms 413.04 ms 0.86 ms
9e3030a+dirty 390.15 ms 381.82 ms -8.33 ms
b4d6bde+dirty 390.51 ms 385.60 ms -4.91 ms
d18ddb1+dirty 339.92 ms 376.15 ms 36.23 ms
6e8a851+dirty 403.44 ms 430.87 ms 27.43 ms
bd87539+dirty 388.51 ms 370.56 ms -17.95 ms
69721ae+dirty 423.63 ms 417.34 ms -6.29 ms
c352c30+dirty 396.83 ms 378.11 ms -18.72 ms

App size

Revision Plain With Sentry Diff
df5da5d+dirty 7.15 MiB 8.42 MiB 1.26 MiB
7d3c3cb+dirty 7.15 MiB 8.42 MiB 1.26 MiB
1a14c8b+dirty 7.15 MiB 8.42 MiB 1.26 MiB
9e3030a+dirty 7.15 MiB 8.42 MiB 1.26 MiB
b4d6bde+dirty 7.15 MiB 8.42 MiB 1.26 MiB
d18ddb1+dirty 7.15 MiB 8.42 MiB 1.26 MiB
6e8a851+dirty 7.15 MiB 8.42 MiB 1.26 MiB
bd87539+dirty 7.15 MiB 8.42 MiB 1.26 MiB
69721ae+dirty 7.15 MiB 8.42 MiB 1.26 MiB
c352c30+dirty 7.15 MiB 8.42 MiB 1.26 MiB

Copy link
Contributor

github-actions bot commented Jul 7, 2025

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1221.94 ms 1228.67 ms 6.73 ms
Size 3.19 MiB 4.36 MiB 1.18 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
bd87539+dirty 1233.71 ms 1229.77 ms -3.94 ms
1a14c8b+dirty 1226.04 ms 1236.96 ms 10.92 ms
531450c+dirty 1225.94 ms 1229.65 ms 3.71 ms
4e2cbd2+dirty 1207.25 ms 1217.52 ms 10.27 ms
398e5d0+dirty 1226.17 ms 1232.82 ms 6.65 ms
ec2a485+dirty 1209.65 ms 1229.18 ms 19.53 ms
d18ddb1+dirty 1200.88 ms 1214.57 ms 13.69 ms
7d3c3cb+dirty 1214.56 ms 1234.53 ms 19.97 ms
38a1af2+dirty 1211.57 ms 1219.27 ms 7.70 ms
9167f73+dirty 1219.47 ms 1234.39 ms 14.92 ms

App size

Revision Plain With Sentry Diff
bd87539+dirty 3.19 MiB 4.36 MiB 1.17 MiB
1a14c8b+dirty 3.19 MiB 4.36 MiB 1.17 MiB
531450c+dirty 3.19 MiB 4.36 MiB 1.17 MiB
4e2cbd2+dirty 3.19 MiB 4.35 MiB 1.17 MiB
398e5d0+dirty 3.19 MiB 4.35 MiB 1.17 MiB
ec2a485+dirty 3.19 MiB 4.35 MiB 1.17 MiB
d18ddb1+dirty 3.19 MiB 4.36 MiB 1.17 MiB
7d3c3cb+dirty 3.19 MiB 4.35 MiB 1.16 MiB
38a1af2+dirty 3.19 MiB 4.35 MiB 1.17 MiB
9167f73+dirty 3.19 MiB 4.35 MiB 1.17 MiB

XCTAssertFalse(
enableUnhandledCPPExceptions, @"enableUnhandledCPPExceptionsV2 should default to disabled");
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I decided to keep the KVM approach in the tests since it directly verifies the set values. I'll be happy to update it to use the ObjC wrapper if needed.

@antonis antonis requested a review from philipphofmann July 9, 2025 06:55
@antonis antonis marked this pull request as ready for review July 9, 2025 06:55
@antonis antonis requested a review from lucas-zimerman as a code owner July 9, 2025 06:55
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.

iOS: make the new enableUnhandledCPPExceptionsV2 option available
1 participant