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

refactor: sentry integration #1420

Merged
merged 81 commits into from
Aug 24, 2024
Merged

Conversation

arthurgeron
Copy link
Contributor

@arthurgeron arthurgeron commented Jul 31, 2024

Closes #1404

Changes

  • Refactored Sentry Implementation:
    • Use single global instantiation, fixes previous global state pollution
    • Sentry now uses recommended React integrations (e.g. react dom router)
  • Error handling logic centralized in Report Error Machine
  • Errors are now asynchronously fed into our error Indexed DB from every source (i.e. Service Worker, setup page, extension)
  • Error Machine watches errors indexedDB for changes and automatically updates its own state
  • Extension no longer completely reloads when dismissing/ignoring errors, now gracefully recovers from the error state.
  • Audit check now ignores vulnerabilities with no known patched version
  • Fixed broken links to @fuels/react in docs after it migrated to Connectors

Features

  • New error review screen
    • User can dismiss individual errors and/or remove non essential fields from errors before sending them to Sentry
    • User can review the Error's contents and identify if any private information is being sent
    • Error data is automatically sanitized for keys and other obviously private information
    • Aside from protected/required properties (i.e. message & stack), other properties can be deleted by the user to avoid leaking private information

Evidence

Error Review Screen

CleanShot 2024-08-15 at 18 57 14

Error Review Flow (Outdated) - Required error properties protection disabled:

CleanShot.2024-08-06.at.18.01.42.mp4

Example Sentry error with proper stack trace and source mapping:

image

@arthurgeron arthurgeron changed the title feat/refactor sentry integration refactor: sentry integration Aug 3, 2024
@arthurgeron arthurgeron force-pushed the ag/feat/refactor-sentry-integration branch from 6ff65cf to 41fa1f2 Compare August 5, 2024 21:46
@arthurgeron arthurgeron force-pushed the ag/feat/refactor-sentry-integration branch from 9678074 to 91f826c Compare August 6, 2024 21:16
@arthurgeron arthurgeron force-pushed the ag/feat/refactor-sentry-integration branch from e75df8e to 00ece49 Compare August 7, 2024 13:05
Copy link
Contributor

github-actions bot commented Aug 7, 2024

Coverage report for ./packages/app

St.
Category Percentage Covered / Total
🔴 Statements 58.58% 3383/5775
🔴 Branches 40.55% 659/1625
🔴 Functions 46.58% 708/1520
🔴 Lines 59.09% 3263/5522

Test suite run success

242 tests passing in 71 suites.

Report generated by 🧪jest coverage report action from 874bc77

@arthurgeron arthurgeron merged commit 737652b into master Aug 24, 2024
14 checks passed
@arthurgeron arthurgeron deleted the ag/feat/refactor-sentry-integration branch August 24, 2024 20:55
LuizAsFight pushed a commit that referenced this pull request Aug 25, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to master, this PR
will be updated.


# Releases
## [email protected]

### Minor Changes

- [#1420](#1420)
[`737652ba`](737652b)
Thanks [@arthurgeron](https://github.com/arthurgeron)! - Refactored
Sentry implementation, error handling, and report logic

### Patch Changes

- [#1429](#1429)
[`3486bee0`](3486bee)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - Upgrade DB
version to include testnet and devnet as initial networks in database

- [#1431](#1431)
[`c1d3dd6b`](c1d3dd6)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - feat: run e2e
test of Lock CRX isolated and remove from regular flow to increase its
speed

- [#1429](#1429)
[`3486bee0`](3486bee)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - Include
networks Testnet and Devnet by default in network list

- [#1420](#1420)
[`737652ba`](737652b)
Thanks [@arthurgeron](https://github.com/arthurgeron)! - Include "Error
Review" screen allowing the user to review and report screens

- [#1429](#1429)
[`3486bee0`](3486bee)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - Improve flow of
network URL to wait for click to "Test connection", instead of load
automatically

- Updated dependencies
\[[`737652ba`](737652b)]:
    -   @fuel-wallet/[email protected]

## @fuel-wallet/[email protected]

### Minor Changes

- [#1420](#1420)
[`737652ba`](737652b)
Thanks [@arthurgeron](https://github.com/arthurgeron)! - Refactored
Sentry implementation, error handling, and report logic

## @fuel-wallet/[email protected]

### Patch Changes

- [#1420](#1420)
[`737652ba`](737652b)
Thanks [@arthurgeron](https://github.com/arthurgeron)! - Fixed broken
links to `@fuels/react` in docs

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

Investigate sentry bugs
2 participants