Skip to content

Conversation

noahsmartin
Copy link
Contributor

Migrate SentryAppState to Swift

#skip-changelog

Copy link

codecov bot commented Aug 11, 2025

Codecov Report

❌ Patch coverage is 97.11538% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@83bb978). Learn more about missing BASE report.
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
Sources/Swift/SentryAppState.swift 97.058% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main     #5872   +/-   ##
========================================
  Coverage        ?   86.690%           
========================================
  Files           ?       423           
  Lines           ?     36621           
  Branches        ?     17314           
========================================
  Hits            ?     31747           
  Misses          ?      4827           
  Partials        ?        47           
Files with missing lines Coverage Δ
SentryTestUtils/TestFileManager.swift 100.000% <100.000%> (ø)
Sources/Sentry/SentryAppStartTracker.m 98.255% <ø> (ø)
Sources/Sentry/SentryAppStateManager.m 100.000% <ø> (ø)
Sources/Sentry/SentryFileManager.m 92.125% <ø> (ø)
Sources/Sentry/SentrySerialization.m 98.818% <ø> (ø)
Sources/Sentry/SentryWatchdogTerminationLogic.m 83.050% <ø> (ø)
Sources/Sentry/SentryWatchdogTerminationTracker.m 100.000% <ø> (ø)
...try/SentryWatchdogTerminationTrackingIntegration.m 85.897% <ø> (ø)
Sources/Swift/SentryAppState.swift 97.058% <97.058%> (ø)

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 83bb978...0ac089a. Read the comment docs.

Copy link
Contributor

github-actions bot commented Aug 11, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1233.78 ms 1260.71 ms 26.94 ms
Size 23.75 KiB 924.87 KiB 901.12 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ebc72be 1221.24 ms 1249.66 ms 28.42 ms
fc0757d 1231.83 ms 1248.98 ms 17.15 ms
f97a070 1218.88 ms 1253.12 ms 34.24 ms
f5d202b 1237.90 ms 1259.49 ms 21.59 ms
1a34ddc 1218.94 ms 1251.86 ms 32.92 ms
ea5a59b 1222.87 ms 1253.47 ms 30.60 ms
83bb978 1238.33 ms 1260.04 ms 21.71 ms
fdea6f5 1216.08 ms 1241.82 ms 25.73 ms
ccf1278 1226.84 ms 1248.51 ms 21.67 ms
9e0030e 1222.78 ms 1242.23 ms 19.45 ms

App size

Revision Plain With Sentry Diff
ebc72be 23.75 KiB 908.22 KiB 884.47 KiB
fc0757d 23.75 KiB 850.73 KiB 826.98 KiB
f97a070 23.75 KiB 858.68 KiB 834.93 KiB
f5d202b 23.75 KiB 904.53 KiB 880.78 KiB
1a34ddc 23.75 KiB 919.88 KiB 896.13 KiB
ea5a59b 23.75 KiB 874.46 KiB 850.71 KiB
83bb978 23.75 KiB 920.64 KiB 896.89 KiB
fdea6f5 23.75 KiB 867.15 KiB 843.40 KiB
ccf1278 23.75 KiB 877.15 KiB 853.40 KiB
9e0030e 23.75 KiB 893.72 KiB 869.97 KiB

Previous results on branch: sentryAppStateSwift

Startup times

Revision Plain With Sentry Diff
12be8c7 1207.08 ms 1226.94 ms 19.85 ms
9cf0a30 1210.45 ms 1238.35 ms 27.90 ms
b04dae0 1229.39 ms 1259.47 ms 30.08 ms
e6d890b 1210.31 ms 1232.60 ms 22.30 ms

App size

Revision Plain With Sentry Diff
12be8c7 23.75 KiB 924.51 KiB 900.76 KiB
9cf0a30 23.75 KiB 924.86 KiB 901.11 KiB
b04dae0 23.75 KiB 924.86 KiB 901.11 KiB
e6d890b 23.75 KiB 924.46 KiB 900.71 KiB

@noahsmartin noahsmartin marked this pull request as ready for review August 14, 2025 05:00
cursor[bot]

This comment was marked as outdated.

Copy link
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

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

LGTM but there is one change in the deserialization you need to fix. I'll approve so you can proceed with the PR when fixed.

@noahsmartin noahsmartin force-pushed the sentryAppStateSwift branch 2 times, most recently from c04380a to 9912b96 Compare August 14, 2025 20:46
Copy link
Contributor

github-actions bot commented Aug 15, 2025

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentryFileManager.m
  • Sources/Sentry/SentrySerialization.m

@noahsmartin noahsmartin merged commit 802deb6 into main Aug 15, 2025
160 of 163 checks passed
@noahsmartin noahsmartin deleted the sentryAppStateSwift branch August 15, 2025 15:25
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.

4 participants