Skip to content
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

internal: Add abnormal mechanism to SentrySession #4842

Merged
merged 4 commits into from
Feb 19, 2025

Conversation

philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Feb 13, 2025

📜 Description

Add abnormal mechanism to SentrySession, which is required for reporting fatal app hangs, and the app hangs rate. This PR only adds the property, which will only be used in a follow up PR via the ANRIntegration. Currently, the property is unused.

#skip-changelog

💡 Motivation and Context

Required for #3319.

💚 How did you test it?

Unit tests.

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the 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.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Add abnormal mechanism to SentrySession which is required
for reporting fatal app hangs and the app hangs rate.
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.260%. Comparing base (c1d576a) to head (658a015).
Report is 10 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4842       +/-   ##
=============================================
+ Coverage   92.249%   92.260%   +0.011%     
=============================================
  Files          658       658               
  Lines        77231     77281       +50     
  Branches     27966     27959        -7     
=============================================
+ Hits         71245     71300       +55     
+ Misses        5887      5885        -2     
+ Partials        99        96        -3     
Files with missing lines Coverage Δ
Sources/Sentry/SentrySession.m 99.512% <100.000%> (+0.019%) ⬆️
Tests/SentryTests/SentrySessionTests.swift 99.346% <100.000%> (+0.289%) ⬆️

... and 9 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 c1d576a...658a015. Read the comment docs.

Copy link

github-actions bot commented Feb 13, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1218.42 ms 1253.49 ms 35.07 ms
Size 22.32 KiB 820.13 KiB 797.81 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
61a1a2b 1222.73 ms 1245.35 ms 22.62 ms
08e12bc 1204.51 ms 1215.98 ms 11.47 ms
65290e0 1204.29 ms 1217.00 ms 12.71 ms
4597906 1228.37 ms 1242.29 ms 13.92 ms
a95ba2f 1223.52 ms 1245.69 ms 22.17 ms
39b1c35 1244.71 ms 1248.60 ms 3.89 ms
2d2068d 1238.02 ms 1249.90 ms 11.88 ms
d257eb9 1206.98 ms 1227.50 ms 20.52 ms
d802ba2 1225.96 ms 1245.37 ms 19.41 ms
3297d6e 1206.80 ms 1213.86 ms 7.06 ms

App size

Revision Plain With Sentry Diff
61a1a2b 21.58 KiB 424.34 KiB 402.76 KiB
08e12bc 21.58 KiB 539.88 KiB 518.30 KiB
65290e0 21.58 KiB 418.76 KiB 397.18 KiB
4597906 21.58 KiB 678.19 KiB 656.61 KiB
a95ba2f 21.58 KiB 706.46 KiB 684.88 KiB
39b1c35 22.85 KiB 408.88 KiB 386.03 KiB
2d2068d 21.58 KiB 729.47 KiB 707.89 KiB
d257eb9 20.76 KiB 433.22 KiB 412.46 KiB
d802ba2 21.90 KiB 708.95 KiB 687.05 KiB
3297d6e 21.58 KiB 418.44 KiB 396.86 KiB

Previous results on branch: internal/session-abnormal-mechanism

Startup times

Revision Plain With Sentry Diff
f108326 1224.31 ms 1244.91 ms 20.61 ms
8827d39 1232.73 ms 1256.76 ms 24.03 ms
54fd31a 1221.27 ms 1234.84 ms 13.57 ms

App size

Revision Plain With Sentry Diff
f108326 22.31 KiB 820.12 KiB 797.81 KiB
8827d39 22.31 KiB 819.63 KiB 797.31 KiB
54fd31a 22.31 KiB 820.13 KiB 797.81 KiB

Copy link
Member

@armcknight armcknight left a comment

Choose a reason for hiding this comment

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

Just took a quick look, some comments/questions

Copy link
Member

@armcknight armcknight left a comment

Choose a reason for hiding this comment

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

No prob @philipphofmann , looks good now!

@philipphofmann philipphofmann merged commit 3284c65 into main Feb 19, 2025
72 of 73 checks passed
@philipphofmann philipphofmann deleted the internal/session-abnormal-mechanism branch February 19, 2025 09:21
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.

2 participants