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

feat: Report fatal app hangs for V2 #4889

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

Conversation

philipphofmann
Copy link
Member

📜 Description

This PR reports fatal app hangs without session updates, only when the experimental option enableAppHangTrackingV2 is enabled. Updating the session will be done in a follow-up PR.

💡 Motivation and Context

This fixes the first part of GH-4260.

💚 How did you test it?

Unit tests and an archived build distributed for development cause the watchdog doesn't terminate debug builds or simply takes a very long time to do that.

https://sentry-sdks.sentry.io/issues/6328843559/events/c79567d75edf48299845a55e2063a700/?project=5428557
CleanShot 2025-02-24 at 19 41 49@2x

https://sentry-sdks.sentry.io/issues/6328844382/events/8f9916263d124370b28d434f1647133d/?project=5428557
CleanShot 2025-02-24 at 19 42 17@2x

📝 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

I will update the docs for fatal app hangs after I added the session updates.

This PR reports fatal app hangs without session updates, only when the
experimental option enableAppHangTrackingV2 is enabled. Updating the
session will be done in a follow-up PR.

This fixes the first part of GH-4260.
Copy link

github-actions bot commented Feb 24, 2025

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

Generated by 🚫 dangerJS against 229ae87

Copy link

codecov bot commented Feb 24, 2025

Codecov Report

Attention: Patch coverage is 98.23322% with 5 lines in your changes missing coverage. Please review.

Project coverage is 92.399%. Comparing base (5ea7b5a) to head (229ae87).

Files with missing lines Patch % Lines
...ations/ANR/SentryANRTrackingIntegrationTests.swift 97.037% 4 Missing ⚠️
Sources/Sentry/SentryANRTrackingIntegration.m 98.305% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4889       +/-   ##
=============================================
+ Coverage   92.369%   92.399%   +0.029%     
=============================================
  Files          659       660        +1     
  Lines        77548     77806      +258     
  Branches     28079     28207      +128     
=============================================
+ Hits         71631     71892      +261     
+ Misses        5821      5817        -4     
- Partials        96        97        +1     
Files with missing lines Coverage Δ
Sources/Swift/Integrations/ANR/SentryANRType.swift 100.000% <100.000%> (ø)
...tryTests/Integrations/ANR/SentryANRTypeTests.swift 100.000% <100.000%> (ø)
Sources/Sentry/SentryANRTrackingIntegration.m 99.337% <98.305%> (+0.222%) ⬆️
...ations/ANR/SentryANRTrackingIntegrationTests.swift 96.685% <97.037%> (+0.058%) ⬆️

... and 13 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 5ea7b5a...229ae87. Read the comment docs.

Copy link

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1219.73 ms 1239.14 ms 19.41 ms
Size 22.31 KiB 823.82 KiB 801.51 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
26530fe 1233.98 ms 1250.06 ms 16.08 ms
6610ef1 1220.33 ms 1225.61 ms 5.28 ms
7fb7afb 1202.18 ms 1219.42 ms 17.24 ms
b8dd0fc 1235.57 ms 1253.12 ms 17.55 ms
443723a 1205.24 ms 1220.52 ms 15.28 ms
2b19b82 1226.73 ms 1243.27 ms 16.53 ms
4be2b3c 1220.47 ms 1223.88 ms 3.41 ms
5d6ce0e 1227.57 ms 1241.08 ms 13.51 ms
9dbf743 1252.10 ms 1262.10 ms 10.00 ms
e34db45 1211.48 ms 1224.45 ms 12.97 ms

App size

Revision Plain With Sentry Diff
26530fe 21.58 KiB 714.93 KiB 693.35 KiB
6610ef1 21.58 KiB 699.25 KiB 677.67 KiB
7fb7afb 20.76 KiB 419.70 KiB 398.94 KiB
b8dd0fc 20.76 KiB 401.39 KiB 380.63 KiB
443723a 20.76 KiB 414.44 KiB 393.68 KiB
2b19b82 21.58 KiB 542.18 KiB 520.60 KiB
4be2b3c 20.76 KiB 393.37 KiB 372.61 KiB
5d6ce0e 22.85 KiB 405.38 KiB 382.53 KiB
9dbf743 20.76 KiB 434.94 KiB 414.18 KiB
e34db45 21.58 KiB 671.30 KiB 649.72 KiB

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.

1 participant