Uh oh!
There was an error while loading. Please reload this page.
fix(perps): target preload performance measurements - #9906
Merged
Conversation
10 tasks
abretonc7s
marked this pull request as ready for review
August 18, 2026 15:05
This was referenced Aug 18, 2026
michalconsensys
approved these changes
Aug 19, 2026
Uh oh!
There was an error while loading. Please reload this page.
pullBot
pushed a commit
to dmrazzy/core
that referenced
this pull request
Aug 19, 2026
## Explanation Release `@metamask/perps-controller` **12.1.0**. No other packages. Minor bump. New public API: - Optional `PerpsPerformance.onControllerConstructed` post-hydration hook - `PerpsTracer.setMeasurement` overload that takes a trace ID - `PERPS_EVENT_PROPERTY.PREVIOUS_LEVERAGE` (`previous_leverage`) Also retargets market/user preload measurements onto their named traces and drops wallet addresses from user-preload trace data. No breaking changes. Existing 3-arg `setMeasurement` callers and clients that omit the new hook keep compiling. ## References - MetaMask#9906 - MetaMask#9881 ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them
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 freeto 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.
Description
Targets Perps preload measurements to their named trace IDs, exposes a post-hydration controller construction timestamp to clients, and removes the wallet address from user-preload trace data. This is the minimal Core contract required by the Perps loading dashboard; market and account bootstrap behavior is unchanged.
Changelog
Validation
Related
Follow-up to #9815.
Note
Low Risk
Telemetry and optional DI hooks only; preload and trading paths are unchanged aside from trace targeting and PII removal from traces.
Overview
Extends the Perps observability contract for the loading dashboard without changing market or account bootstrap behavior.
PerpsPerformancegains an optionalonControllerConstructedcallback, invoked once after synchronous disk hydration in the constructor withperformance.now()(no Sentry write at construct time).PerpsTracer.setMeasurementis typed as an overload that accepts an optional fourthidargument; market and user preload paths now pass the sametraceIdused when opening those named traces so durations attach to the correct span.User data preload no longer puts
userAddresson thePerps User Data Preloadtracedataor in debug logs tied to that flow, reducing PII in telemetry while fetch behavior is unchanged.Reviewed by Cursor Bugbot for commit 308f4c8. Bugbot is set up for automated code reviews on this repo. Configure here.