Skip to content

perf: add trace for UI startup#26636

Merged
matthewwalsh0 merged 6 commits intodevelopfrom
chore/trace-ui-init
Aug 28, 2024
Merged

perf: add trace for UI startup#26636
matthewwalsh0 merged 6 commits intodevelopfrom
chore/trace-ui-init

Conversation

@matthewwalsh0
Copy link
Copy Markdown
Member

@matthewwalsh0 matthewwalsh0 commented Aug 23, 2024

Description

Record a UI Startup Sentry trace to monitor startup times of the UI pages.

In addition:

  • Support use of trace utility function in non-asynchronous contexts.
    • Remove getMetaMetricsEnabled check as this is already done in the custom transport before submission.
  • Generate default ID if omitted when starting and ending traces.

Open in GitHub Codespaces

Related issues

Fixes: #25724

Manual testing steps

Screenshots/Recordings

Before

After

Sentry Console

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Support synchronous trace.
@matthewwalsh0 matthewwalsh0 added the team-tiger-deprecated DEPRECATED: team no longer exists label Aug 23, 2024
@github-actions github-actions bot added the team-confirmations Push issues to confirmations team label Aug 23, 2024
@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review August 23, 2024 16:41
@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner August 23, 2024 16:41
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [21e6184]
Page Load Metrics (83 ± 18 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint702451064019
domContentLoaded44215794019
load52215833818
domInteractive10151363215
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 1006 Bytes (0.01%)
  • common: -56 Bytes (-0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 54.02299% with 40 lines in your changes missing coverage. Please review.

Project coverage is 70.07%. Comparing base (d9e989e) to head (b543539).
Report is 3 commits behind head on develop.

Files Patch % Lines
ui/index.js 0.00% 23 Missing ⚠️
app/scripts/ui.js 0.00% 10 Missing ⚠️
shared/lib/trace.ts 86.96% 6 Missing ⚠️
...nfirm-transaction/confirm-transaction.component.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26636      +/-   ##
===========================================
- Coverage    70.09%   70.07%   -0.02%     
===========================================
  Files         1413     1413              
  Lines        49255    49288      +33     
  Branches     13768    13770       +2     
===========================================
+ Hits         34524    34536      +12     
- Misses       14731    14752      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner August 27, 2024 12:35
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [0eec161]
Page Load Metrics (100 ± 8 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint101177132199
domContentLoaded6213998199
load71140100188
domInteractive195940115
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 49 Bytes (0.00%)
  • ui: 1.17 KiB (0.02%)
  • common: 346 Bytes (0.00%)

@sonarqubecloud
Copy link
Copy Markdown

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [b543539]
Page Load Metrics (89 ± 21 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint702641194421
domContentLoaded49247844622
load55247894421
domInteractive105930147
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 49 Bytes (0.00%)
  • ui: 1.23 KiB (0.02%)
  • common: 437 Bytes (0.01%)

@matthewwalsh0 matthewwalsh0 merged commit 84f4557 into develop Aug 28, 2024
@matthewwalsh0 matthewwalsh0 deleted the chore/trace-ui-init branch August 28, 2024 09:51
@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2024
@metamaskbot metamaskbot added the release-12.5.0 Issue or pull request that will be included in release 12.5.0 label Aug 28, 2024
@metamaskbot metamaskbot added release-12.2.0 Issue or pull request that will be included in release 12.2.0 and removed release-12.5.0 Issue or pull request that will be included in release 12.5.0 labels Sep 6, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-12.2.0 on PR. Adding release label release-12.2.0 on PR and removing other release labels(release-12.5.0), as PR was cherry-picked in branch 12.2.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.2.0 Issue or pull request that will be included in release 12.2.0 team-confirmations Push issues to confirmations team team-tiger-deprecated DEPRECATED: team no longer exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate how to optimize UI initialization

4 participants