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

Track thermal state #4305

Merged
merged 7 commits into from
Sep 5, 2024
Merged

Conversation

gabriellanata
Copy link
Contributor

@gabriellanata gabriellanata commented Aug 29, 2024

📜 Description

Adds tracking of device thermal state

💡 Motivation and Context

Thermal state is an important measurement because it can explain device throttling that commonly cause app hangs.

💚 How did you test it?

Added to existing tests and ran tests locally

📝 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

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.

LGTM

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.

Some of the new tests are failing.

@gabriellanata
Copy link
Contributor Author

@brustolin Seems like the failures are unrelated to my changes: Error cloning certificates git repo, please make sure you have access to the repository - see instructions above Is there something i should do about that?

@armcknight
Copy link
Member

Yeah those permission errors happen whenever a PR comes in from a fork, because the fork doesn't have access to the secrets in our CI settings.

But there are some related failures, like https://github.com/getsentry/sentry-cocoa/actions/runs/10649320635/job/29561450624?pr=4305#step:11:38

@gabriellanata
Copy link
Contributor Author

Ok i think the test is fixed

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.

I pushed a couple quick commits, but everything else here looks great, thanks for adding this. Confirmed it shows up in a test issue:
image

Sources/Sentry/SentryExtraContextProvider.m Outdated Show resolved Hide resolved
scripts/xcode-test.sh Show resolved Hide resolved
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 8 lines in your changes missing coverage. Please review.

Project coverage is 91.683%. Comparing base (8c9d1d4) to head (a627040).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
Sources/Sentry/SentryExtraContextProvider.m 52.941% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4305       +/-   ##
=============================================
+ Coverage   91.671%   91.683%   +0.011%     
=============================================
  Files          617       617               
  Lines        50213     50237       +24     
  Branches     18129     18158       +29     
=============================================
+ Hits         46031     46059       +28     
+ Misses        4089      4084        -5     
- Partials        93        94        +1     
Files with missing lines Coverage Δ
...ntryTestUtils/TestSentryNSProcessInfoWrapper.swift 100.000% <100.000%> (ø)
Sources/Sentry/SentryClient.m 98.591% <100.000%> (+0.002%) ⬆️
Sources/Sentry/SentryNSProcessInfoWrapper.mm 62.962% <100.000%> (+4.629%) ⬆️
...Tests/Helper/SentryExtraContextProviderTests.swift 100.000% <100.000%> (ø)
Tests/SentryTests/SentryClientTests.swift 97.566% <100.000%> (ø)
Sources/Sentry/SentryExtraContextProvider.m 80.000% <52.941%> (-20.000%) ⬇️

... and 5 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 8c9d1d4...a627040. Read the comment docs.

@gabriellanata
Copy link
Contributor Author

cc @brustolin

@brustolin
Copy link
Contributor

Thanks very much @gabriellanata

@brustolin brustolin merged commit 9324d27 into getsentry:main Sep 5, 2024
60 of 64 checks passed
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.

4 participants