[WIP][No QA] Add per-migration Sentry spans to Onyx migration runner#83263
[WIP][No QA] Add per-migration Sentry spans to Onyx migration runner#83263roryabraham wants to merge 1 commit intomainfrom
Conversation
Each individual migration now gets its own Sentry span nested under the existing ONYX_MIGRATIONS parent span, giving us per-migration visibility in Sentry performance traces. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53b281f05e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| parentSpan: getSpan(CONST.TELEMETRY.SPAN_BOOTSPLASH.ONYX_MIGRATIONS), | ||
| }); | ||
| return migration().finally(() => { | ||
| span?.setStatus({code: 1}); |
There was a problem hiding this comment.
Mark failed migration spans as errors
Because span.setStatus({code: 1}) is executed inside .finally(), a migration that rejects is still recorded as a successful span. In the failure scenario, this makes Sentry trace data incorrect and hides which migration actually failed, which undermines the purpose of adding per-migration instrumentation.
Useful? React with 👍 / 👎.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Explanation of Change
The Onyx migration runner already creates a single Sentry span wrapping all migrations, but we have no visibility into how long each individual migration takes. This PR instruments the migration runner so that each migration gets its own child Sentry span nested under the existing
ONYX_MIGRATIONSparent span.Changes are confined to
migrateOnyx.ts:Sentry.startInactiveSpan()around each migration invocationONYX_MIGRATIONSbootsplash spanFixed Issues
N/A - internal improvement for Sentry performance visibility
Tests
BootsplashVisibleOnyxMigrationsspanOffline tests
N/A - Sentry telemetry is best-effort and does not affect offline behavior.
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
N/A - title includes [No QA]
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A - no UI changes
Android: mWeb Chrome
N/A - no UI changes
iOS: Native
N/A - no UI changes
iOS: mWeb Safari
N/A - no UI changes
MacOS: Chrome / Safari
N/A - no UI changes
Made with Cursor