Track non-fatal issues via analytics / Sentry if consent provided#6308
Track non-fatal issues via analytics / Sentry if consent provided#6308
Conversation
ismailgulek
left a comment
There was a problem hiding this comment.
One inline comment, otherwise LGTM!
|
|
||
| func stop() { | ||
| MXLog.debug("[SentryMonitoringClient] Stopped") | ||
| SentrySDK.close() |
There was a problem hiding this comment.
I wonder if SentrySDK.endSession makes more sense here. Not sure but feels like close is an unrecoverable action.
There was a problem hiding this comment.
endSession only really rotates session IDs etc, but keeps the Sentry service running. Having tested this out close is not in fact unrecoverable and SentrySDK can be properly restarted again.
|
📱 Scan the QR code below to install the build for this PR. If you can't scan the QR code you can install the build via this link: https://i.diawi.com/viHKYU |
|
Kudos, SonarCloud Quality Gate passed! |
Codecov Report
@@ Coverage Diff @@
## develop #6308 +/- ##
========================================
Coverage 6.23% 6.23%
========================================
Files 1443 1444 +1
Lines 155488 155533 +45
Branches 62484 62502 +18
========================================
+ Hits 9695 9699 +4
- Misses 145386 145427 +41
Partials 407 407
Continue to review full report at Codecov.
|








Adds Sentry as a monitoring tool to track app health metrics such as crashes and non-fatal issues logged via
MXLog.failure. Using Sentry is subject to the same user consent as other crash and analytics data and is configurable from user settings.Sentry in this PR is integrated directly into an existing
Analyticsclass, which has some pros:The downside of this approach is giving
Analyticsmore responsibilities than it was originally indented to have. I tried to remedy this by changing the documentation of the class, but it is still overwhelmingly aimed at trackingAnalyticEvents. Further refactors could make the split between the use cases more explicit.Related SDK change