Skip to content

fix: Ensure app hangs have foreground app context#7801

Open
denrase wants to merge 2 commits intomainfrom
fix/app-hang-foreground-context
Open

fix: Ensure app hangs have foreground app context#7801
denrase wants to merge 2 commits intomainfrom
fix/app-hang-foreground-context

Conversation

@denrase
Copy link
Copy Markdown
Collaborator

@denrase denrase commented Apr 14, 2026

📜 Description

Set app.in_foreground and app.is_active when creating new app hang events in SentryHangTrackingIntegration, so persisted and fatal app hangs always carry the expected foreground context.

💡 Motivation and Context

Closes #5725

💚 How did you test it?

📝 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.

Set app.in_foreground and app.is_active when creating new app hang events in SentryHangTrackingIntegration, so persisted and fatal app hangs always carry the expected foreground context.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • Ensure app hangs have foreground app context by denrase in #7801
  • Detect development builds via provisioning profile entitlement by denrase in #7702

Internal Changes 🔧

Deps

  • Bump actions/upload-pages-artifact from 4.0.0 to 5.0.0 by dependabot in #7789
  • Bump actions/github-script from 8.0.0 to 9.0.0 by dependabot in #7793

🤖 This preview updates automatically when you update the PR.

@denrase denrase marked this pull request as ready for review April 14, 2026 13:01
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.129%. Comparing base (6ea2191) to head (2c416d4).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7801       +/-   ##
=============================================
- Coverage   85.416%   85.129%   -0.288%     
=============================================
  Files          487       487               
  Lines        29190     29198        +8     
  Branches     12625     12616        -9     
=============================================
- Hits         24933     24856       -77     
- Misses        4207      4291       +84     
- Partials        50        51        +1     
Files with missing lines Coverage Δ
...t/Integrations/SentryHangTrackingIntegration.swift 93.661% <100.000%> (+0.378%) ⬆️

... and 14 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 6ea2191...2c416d4. Read the comment docs.

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.

Ensure app hangs have is_foreground true

1 participant