Skip to content

Conversation

@noahsmartin
Copy link
Contributor

@noahsmartin noahsmartin commented Nov 29, 2025

Convert this simple integration to Swift

#skip-changelog

Closes #6933

@noahsmartin noahsmartin added the ready-to-merge Use this label to trigger all PR workflows label Nov 29, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 29, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1222.38 ms 1256.91 ms 34.53 ms
Size 24.14 KiB 1.01 MiB 1013.10 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
0ee162c 1226.90 ms 1261.72 ms 34.83 ms
7f26f16 1220.62 ms 1255.04 ms 34.42 ms
5290541 1216.38 ms 1249.56 ms 33.18 ms
319fb1e 1219.48 ms 1242.69 ms 23.21 ms
0f410ad 1193.34 ms 1255.49 ms 62.15 ms
b6f8eb3 1217.94 ms 1246.57 ms 28.63 ms
e8f9a1d 1229.02 ms 1264.17 ms 35.15 ms
37238de 1236.00 ms 1267.80 ms 31.80 ms
0ecea77 1191.47 ms 1216.12 ms 24.65 ms
1655116 1220.72 ms 1260.58 ms 39.85 ms

App size

Revision Plain With Sentry Diff
0ee162c 23.75 KiB 933.33 KiB 909.58 KiB
7f26f16 23.75 KiB 1.02 MiB 1016.66 KiB
5290541 24.14 KiB 1.01 MiB 1015.38 KiB
319fb1e 23.75 KiB 1019.18 KiB 995.43 KiB
0f410ad 24.14 KiB 1.01 MiB 1014.82 KiB
b6f8eb3 23.75 KiB 988.70 KiB 964.95 KiB
e8f9a1d 23.75 KiB 969.78 KiB 946.04 KiB
37238de 23.75 KiB 963.18 KiB 939.43 KiB
0ecea77 24.15 KiB 1.01 MiB 1014.90 KiB
1655116 23.75 KiB 1023.84 KiB 1000.10 KiB

Previous results on branch: swiftAsyncIntegrationSwift

Startup times

Revision Plain With Sentry Diff
46b8841 1222.51 ms 1250.14 ms 27.63 ms
a3f85ea 1214.82 ms 1248.58 ms 33.76 ms
05e34b3 1217.47 ms 1253.78 ms 36.31 ms

App size

Revision Plain With Sentry Diff
46b8841 24.14 KiB 1.02 MiB 1015.89 KiB
a3f85ea 24.14 KiB 1.02 MiB 1015.88 KiB
05e34b3 24.14 KiB 1.02 MiB 1015.88 KiB

@noahsmartin noahsmartin force-pushed the swiftAsyncIntegrationSwift branch 3 times, most recently from ce09a6f to f2d54a0 Compare November 29, 2025 17:04
@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.039%. Comparing base (d6ab868) to head (f2d54a0).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #6932       +/-   ##
=============================================
+ Coverage   85.029%   85.039%   +0.009%     
=============================================
  Files          453       453               
  Lines        27635     27639        +4     
  Branches     12144     12145        +1     
=============================================
+ Hits         23498     23504        +6     
+ Misses        4093      3851      -242     
- Partials        44       284      +240     
Files with missing lines Coverage Δ
Sources/Sentry/SentrySDKInternal.m 85.080% <100.000%> (-0.060%) ⬇️
Sources/Swift/Core/Integrations/Integrations.swift 100.000% <100.000%> (+7.142%) ⬆️
...ces/Swift/Integrations/SwiftAsyncIntegration.swift 100.000% <100.000%> (ø)

... and 37 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 d6ab868...f2d54a0. Read the comment docs.

@noahsmartin noahsmartin force-pushed the swiftAsyncIntegrationSwift branch from f2d54a0 to 86a60e4 Compare November 30, 2025 02:26
guard options.swiftAsyncStacktraces else { return nil }

sentrycrashsc_setSwiftAsyncStitching(true)
}
Copy link

Choose a reason for hiding this comment

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

Bug: Global flag not reset when integration disabled on re-initialization

The original Objective-C implementation always called sentrycrashsc_setSwiftAsyncStitching(options.swiftAsyncStacktraces) regardless of the option value, explicitly setting the global stitchSwiftAsync flag to either true or false. The new Swift implementation only calls sentrycrashsc_setSwiftAsyncStitching(true) when enabled and returns nil without calling anything when disabled. If the SDK is re-initialized without calling close() first and swiftAsyncStacktraces changes from true to false, the global flag remains enabled because neither uninstall() is called on the old integration nor is the flag explicitly disabled by the new initialization.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ref: Convert SentrySwiftAsyncIntegration to Swift

2 participants