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

Add abnormal_mechanism to sessions for ANR rate calculation #2475

Merged
merged 10 commits into from
Jan 19, 2023

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Jan 16, 2023

📜 Description

This PR contains 3 main changes:

  • Distinguishes between foreground and background ANRs based on LifecycleWatcher callbacks
  • Force attaches thread dump to the ANR events for easier fixing
  • Introduces new field abnormal_mechanism to the Session payload, which is set when user experienced an ANR event and which is used for ANR rate calculation on the product side

💡 Motivation and Context

Q1 Goal (ANR rate and improvements)

💚 How did you test it?

Manually and automated

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2023

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

Generated by 🚫 dangerJS against 2bdea36

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 314.36 ms 352.96 ms 38.60 ms
Size 1.73 MiB 2.33 MiB 619.53 KiB

Previous results on branch: feat/anr-rate-v1

Startup times

Revision Plain With Sentry Diff
b872136 334.37 ms 349.40 ms 15.03 ms
82a9a16 354.77 ms 393.67 ms 38.90 ms
aa715bc 335.65 ms 384.90 ms 49.25 ms
61ea1d3 312.40 ms 346.45 ms 34.05 ms

App size

Revision Plain With Sentry Diff
b872136 1.73 MiB 2.33 MiB 619.69 KiB
82a9a16 1.73 MiB 2.33 MiB 619.69 KiB
aa715bc 1.73 MiB 2.33 MiB 619.65 KiB
61ea1d3 1.73 MiB 2.33 MiB 619.69 KiB

@romtsn romtsn requested review from shruthilayaj and removed request for adinauer January 16, 2023 20:31
@codecov
Copy link

codecov bot commented Jan 16, 2023

Codecov Report

Base: 80.13% // Head: 80.16% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (2bdea36) compared to base (9b6c37f).
Patch coverage: 96.66% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2475      +/-   ##
============================================
+ Coverage     80.13%   80.16%   +0.02%     
- Complexity     3873     3882       +9     
============================================
  Files           312      313       +1     
  Lines         14672    14695      +23     
  Branches       1943     1947       +4     
============================================
+ Hits          11758    11780      +22     
- Misses         2153     2154       +1     
  Partials        761      761              
Impacted Files Coverage Δ
...entry/src/main/java/io/sentry/SentryBaseEvent.java 90.90% <ø> (ø)
...ry/src/main/java/io/sentry/hints/AbnormalExit.java 0.00% <0.00%> (ø)
...ry/src/main/java/io/sentry/MainEventProcessor.java 85.51% <100.00%> (+0.51%) ⬆️
sentry/src/main/java/io/sentry/SentryClient.java 86.84% <100.00%> (+0.15%) ⬆️
...y/src/main/java/io/sentry/SentryThreadFactory.java 97.36% <100.00%> (+0.07%) ⬆️
sentry/src/main/java/io/sentry/Session.java 94.39% <100.00%> (+0.30%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

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

Nice one, LGTM!

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.

3 participants