Skip to content

fix(perps): target preload performance measurements - #9906

Open
abretonc7s wants to merge 3 commits into
mainfrom
fix/perps-sentry-span-targeting
Open

fix(perps): target preload performance measurements#9906
abretonc7s wants to merge 3 commits into
mainfrom
fix/perps-sentry-span-targeting

Conversation

@abretonc7s

@abretonc7s abretonc7s commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

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

  • Added optional Perps performance hooks for controller construction and explicit trace-targeted measurements.
  • Removed wallet addresses from Perps user-preload traces.

Validation

  • Focused PerpsController Jest: 3 passed
  • Targeted ESLint: passed
  • Prettier and git diff checks: passed
  • Repository pre-push lint is locally blocked by unrelated untracked harness overlays and tsc cache files; GitHub CI is the clean full-repository gate.

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.

PerpsPerformance gains an optional onControllerConstructed callback, invoked once after synchronous disk hydration in the constructor with performance.now() (no Sentry write at construct time).

PerpsTracer.setMeasurement is typed as an overload that accepts an optional fourth id argument; market and user preload paths now pass the same traceId used when opening those named traces so durations attach to the correct span.

User data preload no longer puts userAddress on the Perps User Data Preload trace data or 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.

@abretonc7s abretonc7s self-assigned this Aug 18, 2026
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.

1 participant