refactor: add performance tracing infrastructure (#26044) [cherry-pick]#26624
Merged
Gudahtt merged 2 commits intoVersion-v12.1.0from Aug 22, 2024
Merged
Conversation
95ecf1e to
eb89eaa
Compare
6fff2e6 to
918a46b
Compare
Base automatically changed from
cherry-pick/fix-sentry-sessions
to
Version-v12.1.0
August 22, 2024 19:35
Add the `trace` method, to be used anywhere in the client to generate a Sentry trace to monitor and analyse performance metrics. Add buttons to the developer settings as an easy mechanism to generate Sentry errors (in the UI or background) and traces. Add the `Sentry.browserTracingIntegration` to automatically generate traces for each page navigation, including nested spans for any HTTP requests. Update the Sentry debugging documentation in the `README`.
918a46b to
ade94a6
Compare
Gudahtt
commented
Aug 22, 2024
| import { filterEvents } from './sentry-filter-events'; | ||
| import extractEthjsErrorMessage from './extractEthjsErrorMessage'; | ||
|
|
||
| let installType = 'unknown'; |
Member
Author
There was a problem hiding this comment.
This was moved from below (line 16); it's not newly introduced here, it was part of an earlier cherry-pick.
Collaborator
Builds ready [ade94a6]
Page Load Metrics (55 ± 6 ms)
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## Version-v12.1.0 #26624 +/- ##
===================================================
- Coverage 69.82% 69.80% -0.02%
===================================================
Files 1368 1370 +2
Lines 48670 48739 +69
Branches 13429 13438 +9
===================================================
+ Hits 33981 34019 +38
- Misses 14689 14720 +31 ☔ View full report in Codecov by Sentry. |
…ng-infrastructure
Collaborator
Builds ready [ee12805]
Page Load Metrics (144 ± 174 ms)
|
hjetpoluru
approved these changes
Aug 22, 2024
Collaborator
|
No release label on PR. Adding release label release-12.2.0 on PR, as PR was cherry-picked in branch 12.2.0. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Cherry-pick of (#26044) for v12.1.0. original description:
Description
Add initial tracing and performance metrics infrastructure.
Specifically:
tracemethod, to be used anywhere in the client to generate a Sentry trace to monitor and analyse performance metrics.Sentry.browserTracingIntegrationto automatically generate traces for each page navigation, including nested spans for any HTTP requests.README.Note that the previously used
browserProfilingIntegrationdoes not generate transactions or traces itself, but rather attempts to add profiling data to any generated transactions. This does not appear to be compatible given it requires the Self-Profiling API object which is only available in Chrome and in our case, the UI. In addition, it requires thejs-profilingdocument policy which also appears to currently not be supported in browser extensions.Sentry also provides React specific automated instrumentation via
@sentry/reactand theSentry.reactRouterV5BrowserTracingInstrumentationintegration, but this should be pursued in a separate ticket if needed given the required further refactor.Related issues
Fixes: #2711
Manual testing steps
TracesorPerformancesection.popup.htmlwith nested spans including HTTP requests.Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist