feat: add Sentry traces for Assets Health dashboard#8310
Merged
Conversation
Add comprehensive tracing across AssetsController and balance selector to power an Assets Health dashboard in Sentry. Traces cover data source timing, errors, full fetch pipeline, update pipeline, subscription failures, state size (once on app start), and aggregated balance selector performance.
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
Replace hardcoded trace name strings with named constants (TRACE_FIRST_INIT_FETCH, TRACE_FULL_FETCH, TRACE_DATA_SOURCE_TIMING, etc.) so they are easy to find and refactor.
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
Contributor
Author
|
@metamaskbot publish-preview |
bergarces
reviewed
Mar 26, 2026
bergarces
reviewed
Mar 26, 2026
bergarces
reviewed
Mar 26, 2026
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
Prithpal-Sooriya
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add comprehensive tracing across AssetsController and balance selector to power an Assets Health dashboard in Sentry. Traces cover data source timing, errors, full fetch pipeline, update pipeline, subscription failures, state size (once on app start), and aggregated balance selector performance.
Explanation
References
Checklist
Note
Low Risk
Primarily adds non-blocking telemetry (new Sentry trace emissions and timing measurements) with an optional selector parameter; low functional impact beyond minor timing/overhead changes.
Overview
Adds comprehensive Sentry tracing across
AssetsControllerto power an Assets Health dashboard, including per-middleware timings and failures, end-to-end fetch timing, subscription failure reporting, update/enrichment pipeline timing, and a once-per-session state size snapshot.Updates timing measurement to use
performance.now(), centralizes trace emission via a safe#emitTracehelper, and adjusts tests for the renamedAssetsControllerFirstInitFetchspan. Also adds an optionaltracecallback parameter togetAggregatedBalanceForAccountto measure selector compute time and include asset/network/account counts.Written by Cursor Bugbot for commit 8427f87. This will update automatically on new commits. Configure here.