refactor: dedupe sentry trace - #8994
Merged
Merged
Conversation
10 tasks
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7c35316. Configure here.
geositta
previously approved these changes
Jun 9, 2026
geositta
left a comment
Contributor
There was a problem hiding this comment.
I left one non-blocking question about removing the exported PerpsTraceName literal.
geositta
approved these changes
Jun 10, 2026
4 tasks
abretonc7s
added a commit
that referenced
this pull request
Jun 11, 2026
pull Bot
pushed a commit
to dmrazzy/core
that referenced
this pull request
Jun 11, 2026
## Explanation Releases `@metamask/perps-controller` `8.0.0` → `8.1.0` (minor). Highlights: - **Added:** `HYPERLIQUID_ASSET_NAMES` map + `getHyperLiquidAssetName` helper; relevance-ranked market search (`rankMarketsByQuery`, `getMarketMatchRank`, `MarketMatchRank`); observational hard timeout for order submission. - **Changed:** HyperLiquid positions/orders/balances delivered via per-DEX `clearinghouseState`/`openOrders` on all paths, dropping the deprecated `webData2` channel; `PerpsMarketData.name` now human-readable; bump `@metamask/controller-utils` to `^12.2.0`. - **Removed:** unused `Perps Order Submission Toast` trace name. - **Fixed:** `late_error` now emitted whenever the submission threshold is exceeded in the `placeOrder` catch path. ## References N/A ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [ ] 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 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Version and changelog-only release PR with no source changes; consumer impact follows the already-merged 8.1.0 feature work described in the changelog. > > **Overview** > **Release 1033.0.0** bumps the monorepo and publishes **`@metamask/perps-controller` 8.1.0** (minor). The diff is version metadata and changelog only—no application code in this PR. > > The new **8.1.0** changelog section documents what consumers get: HyperLiquid user data on per-DEX `clearinghouseState` / `openOrders` instead of deprecated `webData2`; human-readable market names and ranked search helpers; order-submission observability (`PlaceOrderTimeoutMs`, `late_success` / `late_error` traces); a fix for `late_error` in `placeOrder` catch paths; removal of an unused trace name; and `@metamask/controller-utils` **^12.2.0**. Several entries now point at the correct upstream PR numbers (e.g. **MetaMask#8994**, **MetaMask#9081**). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 0f15380. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.

Explanation
Gaps to close (likely in the sibling client PRs, not core)
late_success/late_erroris the taxonomy used, rather thantimeoutso some dashboards may need to be updated.usePerpsMeasurement({ traceName: PerpsOrderSubmissionToast })fromusePerpsOrderExecution.ts, deleting the PerpsOrderSubmissionToast TraceName from app/util/trace.ts, and the mobile-side Promise.race.References
Checklist
Note
Medium Risk
Touches live order placement tracing and error classification; behavior intentionally keeps orders in flight past 60s, which may shift Sentry dashboards and client expectations.
Overview
Order submission tracing is consolidated in
TradingService.placeOrder: a 60s observational threshold (PlaceOrderTimeoutMs) fires a warning breadcrumb and flags slow submissions but does not abort the in-flightprovider.placeOrdercall (avoiding false failures when the exchange still accepts the order).The existing
Perps Place Ordertrace now ends with optionalreasonvalues:late_success/late_errorwhen the round-trip exceeded the threshold, orerrorotherwise—including in the catch path after post-provider steps fail. The unusedPerps Order Submission Toastname is removed fromPerpsTraceName.New unit tests cover fast vs late success/error and timer cleanup.
Reviewed by Cursor Bugbot for commit 257b132. Bugbot is set up for automated code reviews on this repo. Configure here.