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 all errors in Sentry #6611

Merged
merged 2 commits into from
Aug 24, 2022
Merged

Track all errors in Sentry #6611

merged 2 commits into from
Aug 24, 2022

Conversation

Anderas
Copy link
Contributor

@Anderas Anderas commented Aug 22, 2022

Complement to matrix-org/matrix-ios-sdk#1558

  • track all MXLogError and MXLogFailure in Sentry
  • reduce the sample rate of sentry from 100% to 10% as the volume is currently quite / sufficiently high

@Anderas Anderas requested a review from pixlwave August 22, 2022 16:39
@@ -224,7 +224,7 @@ extension ContactsPickerViewModel: ContactsTableViewControllerDelegate {
case .success:
self.coordinatorDelegate?.contactsPickerViewModelDidEndInvite(self)
case .failure:
MXLog.error("[ContactsPickerViewModel] Failed to invite \(participantId) due to error; \(response.error ?? "nil")")
MXLog.error("[ContactsPickerViewModel] Failed to invite participant", context: response.error)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deliberately not logging userId

@@ -44,7 +44,7 @@ extension MarkdownToHTMLRenderer: MarkdownToHTMLRendererProtocol {
ast.repairLinks()
return try DownHTMLRenderer.astToHTML(ast, options: options)
} catch {
MXLog.error("[MarkdownToHTMLRenderer] renderToHTML failed with string: \(markdown)")
MXLog.error("[MarkdownToHTMLRenderer] renderToHTML failed")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not logging the markdown in case it contains sensitive decrypted data. If we get a lot of events without context, we can add mxlog.debug for rageshakes

@sonarcloud
Copy link

sonarcloud bot commented Aug 23, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/vWe4zV

@codecov-commenter
Copy link

Codecov Report

Merging #6611 (48ce9c8) into develop (a8239ff) will decrease coverage by 0.01%.
The diff coverage is 0.92%.

@@             Coverage Diff             @@
##           develop    #6611      +/-   ##
===========================================
- Coverage     6.26%    6.25%   -0.02%     
===========================================
  Files         1460     1460              
  Lines       154426   154467      +41     
  Branches     62058    61943     -115     
===========================================
- Hits          9671     9655      -16     
- Misses      144347   144406      +59     
+ Partials       408      406       -2     
Impacted Files Coverage Δ
Riot/Categories/UIViewController.swift 39.17% <0.00%> (ø)
Riot/Managers/Logging/MatrixSDKLogger.swift 0.00% <0.00%> (ø)
Riot/Modules/Analytics/Analytics.swift 9.81% <0.00%> (ø)
...iot/Modules/Analytics/SentryMonitoringClient.swift 0.00% <0.00%> (ø)
Riot/Modules/Application/LegacyAppDelegate.m 13.58% <0.00%> (-0.36%) ⬇️
...s/Authentication/SessionVerificationListener.swift 0.00% <0.00%> (ø)
...iot/Modules/Common/Recents/RecentsViewController.m 8.69% <0.00%> (-0.03%) ⬇️
...eyVerificationVerifyByScanningViewController.swift 0.00% <0.00%> (ø)
Riot/Modules/LocationSharing/LocationManager.swift 0.00% <0.00%> (ø)
.../Modules/LocationSharing/UserLocationService.swift 0.00% <0.00%> (ø)
... and 39 more

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

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Anderas Anderas merged commit 966069e into develop Aug 24, 2022
@Anderas Anderas deleted the andy/sentry branch August 24, 2022 07:18
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