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

Improve Sentry diagnostic information #20449

Closed
6 tasks done
Gudahtt opened this issue Aug 14, 2023 · 0 comments
Closed
6 tasks done

Improve Sentry diagnostic information #20449

Gudahtt opened this issue Aug 14, 2023 · 0 comments

Comments

@Gudahtt
Copy link
Member

Gudahtt commented Aug 14, 2023

Recently we've seen some confusing Sentry error reports, which seem to indicate that migrations have run successfully but the state remains in the pre-migration state. Currently the Sentry error reports don't provide enough information to determine what is happening here. We are going to improve the diagnostic information sent to Sentry to help investigate this problem.

  • Log when migrations are happening
    • Log within migrator what the current migration version is, and which pending migrations we are running
  • Log and report to Sentry when an invariant is unmet in a migration
    • For each branch in a migration where we bail, we should either console.log (for anticipated scenarios) or captureException (for impossible scenarios)
    • We should update migrations back to first recent network controller state change
  • Log state shape to Sentry
    • Log state shape just to top-level controller state properties, including just the type of any properties omitted by mask
    • In background, update to use non-flatted state
  • Log migration version to Sentry
    • Update getSentryState to include current migration version
    • This version would be stored in appState controller or in new application metadata controller
  • Validate versioned data after running migrations
    • Includes improving existing validation (we check for falsy state)
  • Log current and previous app version
    • New application metadata controller
  • Ensure Sentry mask is up-to-date
    • Consider building mask dynamically using metadata for newer controllers, with hard-coded mask remaining for older controllers
    • Edit: Postponing this for later
Gudahtt added a commit that referenced this issue Aug 15, 2023
The masked wallet state object sent to Sentry has been updated to
include the type of each property omitted from the mask. This lets us
at least see the full state shape, making it easier to see when errors
are caused by invalid state.

Relates to #20449
Gudahtt added a commit that referenced this issue Aug 16, 2023
The masked wallet state object sent to Sentry has been updated to
include the type of each property omitted from the mask. This lets us
at least see the full state shape, making it easier to see when errors
are caused by invalid state.

Relates to #20449
Gudahtt added a commit that referenced this issue Aug 16, 2023
The masked wallet state object sent to Sentry has been updated to
include the type of each property omitted from the mask. This lets us
at least see the full state shape, making it easier to see when errors
are caused by invalid state.

Relates to #20449
Gudahtt added a commit that referenced this issue Aug 16, 2023
The masked wallet state object sent to Sentry has been updated to
include the type of each property omitted from the mask. This lets us
at least see the full state shape, making it easier to see when errors
are caused by invalid state.

Relates to #20449
Gudahtt added a commit that referenced this issue Aug 16, 2023
The masked wallet state object sent to Sentry has been updated to
include the type of each property omitted from the mask. This lets us
at least see the full state shape, making it easier to see when errors
are caused by invalid state.

Relates to #20449
Gudahtt added a commit that referenced this issue Aug 16, 2023
* Add types of hidden properties to Sentry data

The masked wallet state object sent to Sentry has been updated to
include the type of each property omitted from the mask. This lets us
at least see the full state shape, making it easier to see when errors
are caused by invalid state.

Relates to #20449

* Remove inconsistent state snapshot properties

The state snapshot tests have been updated to exclude properties that
were shown to differ between runs.
danjm pushed a commit that referenced this issue Aug 17, 2023
* Add types of hidden properties to Sentry data

The masked wallet state object sent to Sentry has been updated to
include the type of each property omitted from the mask. This lets us
at least see the full state shape, making it easier to see when errors
are caused by invalid state.

Relates to #20449

* Remove inconsistent state snapshot properties

The state snapshot tests have been updated to exclude properties that
were shown to differ between runs.
danjm pushed a commit that referenced this issue Aug 17, 2023
* Add types of hidden properties to Sentry data

The masked wallet state object sent to Sentry has been updated to
include the type of each property omitted from the mask. This lets us
at least see the full state shape, making it easier to see when errors
are caused by invalid state.

Relates to #20449

* Remove inconsistent state snapshot properties

The state snapshot tests have been updated to exclude properties that
were shown to differ between runs.
@Gudahtt Gudahtt closed this as completed Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant