Open MajorLift opened 4 days ago
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 1762 | 2305 | 1966 | 161 | 77 |
domContentLoaded | 1743 | 2293 | 1933 | 151 | 72 | ||
load | 1754 | 2309 | 1967 | 165 | 79 | ||
domInteractive | 17 | 82 | 40 | 17 | 8 | ||
backgroundConnect | 11 | 89 | 34 | 27 | 13 | ||
firstReactRender | 78 | 392 | 146 | 75 | 36 | ||
getState | 5 | 60 | 17 | 18 | 8 | ||
initialActions | 0 | 1 | 0 | 0 | 0 | ||
loadScripts | 1261 | 1769 | 1431 | 138 | 66 | ||
setupStore | 6 | 86 | 14 | 19 | 9 | ||
uiStartup | 1950 | 2781 | 2234 | 243 | 117 |
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 303 | 2798 | 1780 | 626 | 301 |
domContentLoaded | 1766 | 2700 | 2024 | 189 | 91 | ||
load | 1772 | 2846 | 2053 | 212 | 102 | ||
domInteractive | 16 | 217 | 60 | 43 | 21 | ||
backgroundConnect | 8 | 112 | 35 | 32 | 15 | ||
firstReactRender | 98 | 163 | 123 | 21 | 10 | ||
getState | 5 | 61 | 19 | 19 | 9 | ||
initialActions | 0 | 0 | 0 | 0 | 0 | ||
loadScripts | 1295 | 2135 | 1500 | 169 | 81 | ||
setupStore | 6 | 58 | 13 | 15 | 7 | ||
uiStartup | 1980 | 3196 | 2298 | 251 | 121 |
Motivation
The Sentry browser tracing integration intercepts all outgoing fetch requests, and measures their duration in automatically-generated
http.client
spans.Currently, our Sentry configuration does not exclude POST requests to Sentry DSN endpoints from this process. Unfortunately, these requests appear to have been taking up not just a non-negligible, but an outright dominating footprint in our Sentry performance quota and budget.
Based on usage data over the past 90 days in our
metamask
Sentry project, we can make the following observations (the following data only covers requests sent tosentry.io
, and doesn't include requests sent to hostnames under that domain e.g.*.ingest.us.sentry.io
):/home.html
and/popup.html
traces, the auto-generated spans for sentry POST requests collectively rank in 3rd place by the "Time Spent" metric, only coming in behind theui.long-task
andpageload
spans, and actually being ahead ofnavigation
as well as all other legitimate requests to resource API endpoints.Description
To fix this, we need to filter out communications with Sentry itself from the monitoring data that is logged to the Sentry dashboard.
This commit achieves this by configuring Sentry's browser tracing integration with its
shouldCreateSpanForRequest
option.Related issues
Manual testing steps
http.client
spans for 'sentry.io' have been logged.Screenshots/Recordings
Before
Note the three
http.client
spans for 'sentry.io':After
No auto-generated
http.client
spans show up in the Sentry dashboard for POST requests to the Sentry DSN endpoint, even though the requests are still going out.http.client
spans for other URLs are still being created and measured.Pre-merge author checklist
Pre-merge reviewer checklist