Skip to content

Conversation

@noahsmartin
Copy link
Contributor

@noahsmartin noahsmartin commented Dec 19, 2025

Resolves https://linear.app/getsentry/issue/COCOA-989/refactor-sentrymetrickitintegrationm-in-swift

I converted most of this in my last PR so this just follows up to convert the rest

There is one logic change here. If MetricKit ever delivered a CPU exception event with callStackPerThread = true we would now still handle it. It's not expected to happen, but there's no reason to have a guard case specifically for it, just like we don't have any for app hangs.

@linear
Copy link

linear bot commented Dec 19, 2025

@noahsmartin noahsmartin added the ready-to-merge Use this label to trigger all PR workflows label Dec 19, 2025
@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@d069d70). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main     #7076   +/-   ##
========================================
  Coverage        ?   84.860%           
========================================
  Files           ?       459           
  Lines           ?     27517           
  Branches        ?     12135           
========================================
  Hits            ?     23351           
  Misses          ?      4124           
  Partials        ?        42           
Files with missing lines Coverage Δ
Sources/Sentry/SentryEvent.m 98.823% <ø> (ø)
Sources/Sentry/SentrySDKInternal.m 84.647% <ø> (ø)
Sources/Sentry/SentryViewHierarchyIntegration.m 100.000% <ø> (ø)
Sources/Swift/Core/Integrations/Integrations.swift 100.000% <100.000%> (ø)
...Core/MetricKit/SentryMXCallStackTree+Parsing.swift 100.000% <100.000%> (ø)
...s/Swift/Core/MetricKit/SentryMXCallStackTree.swift 100.000% <ø> (ø)
Sources/Swift/Core/MetricKit/SentryMXManager.swift 100.000% <100.000%> (ø)
...ft/Core/MetricKit/SentryMetricKitIntegration.swift 100.000% <100.000%> (ø)
Sources/Swift/SentryDependencyContainer.swift 98.230% <ø> (ø)

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 d069d70...2028321. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1217.36 ms 1249.70 ms 32.35 ms
Size 24.14 KiB 1.03 MiB 1.00 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
43597ba 1214.88 ms 1243.52 ms 28.65 ms
9214f4c 1223.19 ms 1246.96 ms 23.77 ms
e70670c 1223.47 ms 1238.67 ms 15.20 ms
59fc426 1240.49 ms 1256.94 ms 16.45 ms
6cb4338 1238.47 ms 1256.96 ms 18.49 ms
41c0aa8 1222.75 ms 1262.40 ms 39.65 ms
35f6d9e 1222.24 ms 1253.48 ms 31.23 ms
d6ab868 1228.98 ms 1260.51 ms 31.53 ms
ec3fc3a 1212.92 ms 1245.06 ms 32.14 ms
781f560 1232.83 ms 1263.56 ms 30.73 ms

App size

Revision Plain With Sentry Diff
43597ba 23.75 KiB 880.32 KiB 856.58 KiB
9214f4c 24.14 KiB 1.02 MiB 1017.26 KiB
e70670c 23.75 KiB 975.19 KiB 951.45 KiB
59fc426 23.75 KiB 920.64 KiB 896.89 KiB
6cb4338 23.75 KiB 913.63 KiB 889.88 KiB
41c0aa8 23.75 KiB 986.80 KiB 963.05 KiB
35f6d9e 23.75 KiB 1.01 MiB 1006.48 KiB
d6ab868 24.14 KiB 1.01 MiB 1015.23 KiB
ec3fc3a 23.74 KiB 1022.75 KiB 999.01 KiB
781f560 23.75 KiB 1.02 MiB 1016.46 KiB

Previous results on branch: metricKitIntegrationSwift

Startup times

Revision Plain With Sentry Diff
4224e11 1215.87 ms 1247.00 ms 31.13 ms
f3c0092 1229.67 ms 1258.32 ms 28.65 ms
7ebbb60 1216.83 ms 1249.49 ms 32.66 ms
443cbc8 1224.02 ms 1251.16 ms 27.14 ms

App size

Revision Plain With Sentry Diff
4224e11 24.14 KiB 1.03 MiB 1.00 MiB
f3c0092 24.14 KiB 1.03 MiB 1.00 MiB
7ebbb60 24.14 KiB 1.03 MiB 1.00 MiB
443cbc8 24.14 KiB 1.03 MiB 1.00 MiB

@noahsmartin noahsmartin force-pushed the metricKitIntegrationSwift branch from 5d0c649 to 9f39761 Compare December 19, 2025 17:58
@noahsmartin noahsmartin force-pushed the metricKitIntegrationSwift branch from 9f39761 to af78978 Compare December 19, 2025 17:59
@noahsmartin noahsmartin force-pushed the metricKitIntegrationSwift branch from 37d4a1a to 7062639 Compare December 19, 2025 18:47
@noahsmartin noahsmartin force-pushed the metricKitIntegrationSwift branch 2 times, most recently from b8ff92c to 9529672 Compare December 19, 2025 19:01
@noahsmartin noahsmartin force-pushed the metricKitIntegrationSwift branch from 9529672 to 94d6460 Compare December 19, 2025 19:18
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.

LGTM

@noahsmartin noahsmartin force-pushed the metricKitIntegrationSwift branch from 94d6460 to 2028321 Compare December 19, 2025 21:05
@noahsmartin noahsmartin merged commit 47904d6 into main Dec 19, 2025
191 checks passed
@noahsmartin noahsmartin deleted the metricKitIntegrationSwift branch December 19, 2025 21:31
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.

3 participants