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: Pause and resume AppHangTracking API #4077

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Jun 17, 2024

📜 Description

Add two methods pauseAppHangTracking and
resumeAppHangTracking to ignore reported AppHangs.

Docs PR getsentry/sentry-docs#10409.

💡 Motivation and Context

Fixes GH-3472

💚 How did you test it?

Unit tests and sample app.

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • 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.
  • 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 two methods pauseAppHangTracking and
resumeAppHangTracking to ignore reported AppHangs.

Fixes GH-3472
Copy link

github-actions bot commented Jun 17, 2024

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

Generated by 🚫 dangerJS against 0d813a7

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 96.34146% with 3 lines in your changes missing coverage. Please review.

Project coverage is 91.094%. Comparing base (e19cca3) to head (0d813a7).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4077       +/-   ##
=============================================
- Coverage   91.208%   91.094%   -0.114%     
=============================================
  Files          611       611               
  Lines        48126     47838      -288     
  Branches     17288         0    -17288     
=============================================
- Hits         43895     43578      -317     
- Misses        4138      4260      +122     
+ Partials        93         0       -93     
Files Coverage Δ
Sources/Sentry/SentryANRTrackingIntegration.m 100.000% <100.000%> (ø)
Sources/Sentry/SentryHub.m 98.290% <100.000%> (-0.265%) ⬇️
Sources/Sentry/SentrySDK.m 89.655% <100.000%> (+0.498%) ⬆️
Tests/SentryTests/SentryHubTests.swift 98.866% <100.000%> (+0.015%) ⬆️
Tests/SentryTests/SentrySDKTests.swift 95.429% <96.000%> (+0.027%) ⬆️
...ations/ANR/SentryANRTrackingIntegrationTests.swift 95.620% <92.592%> (-0.744%) ⬇️

... and 88 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 e19cca3...0d813a7. Read the comment docs.

Copy link

github-actions bot commented Jun 17, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1222.43 ms 1237.14 ms 14.71 ms
Size 21.58 KiB 670.39 KiB 648.81 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
0559a8f 1236.90 ms 1253.46 ms 16.56 ms
dc0db9e 1222.10 ms 1240.90 ms 18.80 ms
e324230 1225.84 ms 1250.40 ms 24.57 ms
1734d1b 1219.41 ms 1236.84 ms 17.43 ms
3277f18 1229.29 ms 1248.92 ms 19.63 ms
6e342ac 1216.02 ms 1232.88 ms 16.86 ms
326b7eb 1252.86 ms 1259.56 ms 6.70 ms
a71f5e2 1239.92 ms 1250.67 ms 10.76 ms
ee3f02e 1236.53 ms 1263.54 ms 27.01 ms
5f8ee7a 1249.48 ms 1252.20 ms 2.72 ms

App size

Revision Plain With Sentry Diff
0559a8f 21.58 KiB 419.81 KiB 398.22 KiB
dc0db9e 20.76 KiB 419.62 KiB 398.86 KiB
e324230 22.85 KiB 408.87 KiB 386.02 KiB
1734d1b 21.58 KiB 418.82 KiB 397.23 KiB
3277f18 22.84 KiB 402.88 KiB 380.03 KiB
6e342ac 20.76 KiB 436.66 KiB 415.90 KiB
326b7eb 20.76 KiB 432.31 KiB 411.55 KiB
a71f5e2 21.58 KiB 424.34 KiB 402.76 KiB
ee3f02e 22.84 KiB 401.67 KiB 378.83 KiB
5f8ee7a 22.85 KiB 411.93 KiB 389.08 KiB

Previous results on branch: feat/pause-resume-app-hangs

Startup times

Revision Plain With Sentry Diff
20893fc 1230.39 ms 1243.12 ms 12.73 ms

App size

Revision Plain With Sentry Diff
20893fc 21.58 KiB 670.39 KiB 648.81 KiB

Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

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

Looks Good.

A couple of nitpick suggestions.

Sources/Sentry/SentrySDK.m Outdated Show resolved Hide resolved
Sources/Sentry/SentrySDK.m Outdated Show resolved Hide resolved
@philipphofmann philipphofmann merged commit a8f7a1b into main Jun 17, 2024
65 of 66 checks passed
@philipphofmann philipphofmann deleted the feat/pause-resume-app-hangs branch June 17, 2024 11:16
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.

is It expected to sent App Hangs event if System popup about FaceId permission shown ?
2 participants