Skip to content

feat(tracing): Add check and download timing spans to Expo Updates listener - #6430

Merged
antonis merged 7 commits into
mainfrom
antonis/feat/expo-updates-timing
Jul 28, 2026
Merged

feat(tracing): Add check and download timing spans to Expo Updates listener#6430
antonis merged 7 commits into
mainfrom
antonis/feat/expo-updates-timing

Conversation

@antonis

@antonis antonis commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Adds timing spans to the expoUpdatesListenerIntegration to capture how long OTA update checks and downloads take. The integration previously only emitted breadcrumbs for state transitions — now it also creates spans:

  • app.update.check — measures the duration of an update check (from isChecking=true to completion or error)
  • app.update.download — measures the duration of an update download (from isDownloading=true to completion or error)

Both spans:

  • Use forceTransaction: true since OTA checks typically happen outside user-interaction transactions
  • Set expo.update.id attribute on success when a manifest ID is available
  • Set error status with the error message on failure
  • Are properly cancelled (with error status) on client close or re-init to prevent leaks

Existing breadcrumb behavior is fully preserved.

💡 Motivation and Context

The expoUpdatesListenerIntegration captures that a check/download happened but not how long it took. When investigating slow app starts or poor UX after an OTA update, there's no way to see whether the update check or download was the bottleneck.

Closes #6337

💚 How did you test it?

  • 33 unit tests covering all span lifecycle paths (start, ok/error end, close cleanup, re-init cleanup, full lifecycle)
  • All existing breadcrumb tests continue to pass unchanged
  • All 272 integration tests pass
  • npx jest test/integrations/expoupdateslistener.test.ts — 33/33 pass

📝 Checklist

🔮 Next steps

getsentry/sentry-conventions#540

antonis and others added 2 commits July 9, 2026 13:37
…stener

The integration now creates spans (`app.update.check`, `app.update.download`)
alongside the existing breadcrumbs, capturing how long OTA update checks
and downloads take. Spans use `forceTransaction: true` since OTA checks
typically happen outside user-interaction transactions. In-progress spans
are properly cancelled on client close or re-init.

Closes RN-683

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis
antonis force-pushed the antonis/feat/expo-updates-timing branch from 9924381 to 6420e8f Compare July 9, 2026 12:30
Comment thread packages/core/src/js/integrations/expoupdateslistener.ts
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(tracing): Add check and download timing spans to Expo Updates listener by antonis in #6430
  • feat(core): Attach TurboModule breakdown to active spans on spanEnd by alwx in #6478
  • feat(core): Export instrumentStateGraph and deprecate instrumentLangGraph by antonis in #6520
  • chore(deps): bump the codeql-action group across 1 directory with 3 updates by dependabot in #6517
  • chore(deps): bump ruby/setup-ruby from 1.319.0 to 1.321.0 by dependabot in #6518
  • chore(deps): bump actions/checkout from 7.0.0 to 7.0.1 by dependabot in #6519
  • chore(deps): update JavaScript SDK to v10.68.0 by github-actions in #6516
  • chore(deps): bump tar from 7.5.20 to 7.5.21 by dependabot in #6515
  • chore(deps): bump lerna to ^9.0.7 to resolve remaining dev-tooling advisories by antonis in #6499
  • chore(deps): Migrate to @sentry/bundler-plugins by antonis in #6501
  • chore: update changelog warning with fix version by antonis in #6509
  • chore(deps): bump actions/setup-node from 6.4.0 to 7.0.0 by dependabot in #6463
  • chore(deps): bump json from 2.17.1.2 to 2.19.9 in /performance-tests by dependabot in #6512
  • chore(deps): update CLI to v3.6.2 by github-actions in #6511
  • chore(deps): update Sentry Android Gradle Plugin to v6.16.0 by github-actions in #6508
  • chore(deps): update Android SDK to v8.50.1 by github-actions in #6503

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against d62495e

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread packages/core/src/js/integrations/expoupdateslistener.ts Outdated
Comment thread packages/core/src/js/integrations/expoupdateslistener.ts Outdated
Extract endSpanWithResult helper to reduce complexity below threshold,
remove unnecessary type assertions, and apply formatter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis antonis added the ready-to-merge Triggers the full CI test suite label Jul 9, 2026
@sentry

sentry Bot commented Jul 9, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.20.0 (100) Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3852.66 ms 1224.70 ms -2627.96 ms
Size 4.98 MiB 6.55 MiB 1.58 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
0a147b2+dirty 3838.15 ms 1221.94 ms -2616.21 ms
15d4514+dirty 3840.17 ms 1225.79 ms -2614.38 ms
5569641+dirty 3839.22 ms 1231.30 ms -2607.91 ms
3a829f0+dirty 3839.76 ms 1214.69 ms -2625.06 ms
4966363+dirty 3854.04 ms 1231.55 ms -2622.50 ms
eb93136+dirty 3843.09 ms 1220.11 ms -2622.98 ms
0b1b5e3+dirty 3823.96 ms 1220.12 ms -2603.84 ms
ca9d079+dirty 3835.63 ms 1218.68 ms -2616.95 ms
1e5d96d+dirty 3851.45 ms 1212.05 ms -2639.41 ms
5ee78d6+dirty 3847.52 ms 1224.27 ms -2623.25 ms

App size

Revision Plain With Sentry Diff
0a147b2+dirty 4.98 MiB 6.51 MiB 1.53 MiB
15d4514+dirty 5.15 MiB 6.70 MiB 1.55 MiB
5569641+dirty 5.15 MiB 6.67 MiB 1.51 MiB
3a829f0+dirty 5.15 MiB 6.70 MiB 1.54 MiB
4966363+dirty 5.15 MiB 6.68 MiB 1.53 MiB
eb93136+dirty 5.15 MiB 6.69 MiB 1.53 MiB
0b1b5e3+dirty 5.15 MiB 6.70 MiB 1.54 MiB
ca9d079+dirty 5.15 MiB 6.69 MiB 1.53 MiB
1e5d96d+dirty 4.98 MiB 6.46 MiB 1.49 MiB
5ee78d6+dirty 5.15 MiB 6.69 MiB 1.53 MiB

Previous results on branch: antonis/feat/expo-updates-timing

Startup times

Revision Plain With Sentry Diff
777ab8e+dirty 3828.36 ms 1218.61 ms -2609.75 ms

App size

Revision Plain With Sentry Diff
777ab8e+dirty 4.98 MiB 6.53 MiB 1.55 MiB

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3812.67 ms 1208.85 ms -2603.82 ms
Size 4.98 MiB 6.55 MiB 1.58 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
0a147b2+dirty 3845.11 ms 1230.81 ms -2614.30 ms
09a902f+dirty 3847.65 ms 1221.31 ms -2626.34 ms
88735e9+dirty 3837.80 ms 1216.39 ms -2621.41 ms
5a23c47+dirty 3843.54 ms 1226.05 ms -2617.50 ms
0bd8916+dirty 3816.17 ms 1215.05 ms -2601.12 ms
100ce80+dirty 3843.57 ms 1226.46 ms -2617.12 ms
1e5d96d+dirty 3845.93 ms 1222.51 ms -2623.42 ms
853723c+dirty 3849.33 ms 1221.07 ms -2628.26 ms
f170ec3+dirty 3844.74 ms 1222.67 ms -2622.07 ms
68672fc+dirty 3832.22 ms 1228.29 ms -2603.93 ms

App size

Revision Plain With Sentry Diff
0a147b2+dirty 4.98 MiB 6.51 MiB 1.53 MiB
09a902f+dirty 4.98 MiB 6.46 MiB 1.49 MiB
88735e9+dirty 4.98 MiB 6.46 MiB 1.49 MiB
5a23c47+dirty 4.98 MiB 6.46 MiB 1.49 MiB
0bd8916+dirty 5.15 MiB 6.69 MiB 1.53 MiB
100ce80+dirty 5.15 MiB 6.67 MiB 1.51 MiB
1e5d96d+dirty 4.98 MiB 6.46 MiB 1.49 MiB
853723c+dirty 5.15 MiB 6.69 MiB 1.53 MiB
f170ec3+dirty 5.15 MiB 6.69 MiB 1.53 MiB
68672fc+dirty 5.15 MiB 6.71 MiB 1.55 MiB

Previous results on branch: antonis/feat/expo-updates-timing

Startup times

Revision Plain With Sentry Diff
777ab8e+dirty 3822.11 ms 1219.02 ms -2603.09 ms

App size

Revision Plain With Sentry Diff
777ab8e+dirty 4.98 MiB 6.53 MiB 1.55 MiB

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 425.50 ms 465.00 ms 39.50 ms
Size 49.74 MiB 55.37 MiB 5.63 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5ca03f9+dirty 423.30 ms 467.00 ms 43.70 ms
1e5d96d+dirty 519.43 ms 543.62 ms 24.19 ms
21a1e70+dirty 405.72 ms 436.16 ms 30.44 ms
27d9693+dirty 419.08 ms 469.12 ms 50.04 ms
41d6254+dirty 424.45 ms 474.34 ms 49.89 ms
0a9e622+dirty 420.73 ms 464.83 ms 44.10 ms
7887847+dirty 416.61 ms 462.04 ms 45.43 ms
e763471+dirty 426.57 ms 458.21 ms 31.64 ms
4953e94+dirty 442.02 ms 456.52 ms 14.50 ms
40c9884+dirty 430.40 ms 497.76 ms 67.36 ms

App size

Revision Plain With Sentry Diff
5ca03f9+dirty 49.74 MiB 55.26 MiB 5.52 MiB
1e5d96d+dirty 49.74 MiB 54.81 MiB 5.07 MiB
21a1e70+dirty 49.74 MiB 54.82 MiB 5.07 MiB
27d9693+dirty 49.74 MiB 55.09 MiB 5.34 MiB
41d6254+dirty 48.30 MiB 53.60 MiB 5.30 MiB
0a9e622+dirty 49.74 MiB 55.09 MiB 5.34 MiB
7887847+dirty 49.74 MiB 54.81 MiB 5.07 MiB
e763471+dirty 49.74 MiB 54.85 MiB 5.11 MiB
4953e94+dirty 43.75 MiB 48.08 MiB 4.33 MiB
40c9884+dirty 49.74 MiB 55.09 MiB 5.34 MiB

Previous results on branch: antonis/feat/expo-updates-timing

Startup times

Revision Plain With Sentry Diff
777ab8e+dirty 420.33 ms 467.79 ms 47.46 ms

App size

Revision Plain With Sentry Diff
777ab8e+dirty 49.74 MiB 55.26 MiB 5.52 MiB

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 531.58 ms 571.75 ms 40.17 ms
Size 49.74 MiB 55.37 MiB 5.63 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
100ce80+dirty 463.28 ms 532.10 ms 68.82 ms
0bd8916+dirty 400.15 ms 442.72 ms 42.57 ms
5ca03f9+dirty 412.83 ms 459.40 ms 46.57 ms
5c1e987+dirty 444.71 ms 475.13 ms 30.42 ms
27d9693+dirty 438.63 ms 514.08 ms 75.46 ms
3b6e9f9+dirty 442.39 ms 486.44 ms 44.05 ms
0a9e622+dirty 425.22 ms 457.00 ms 31.78 ms
882f8ae+dirty 408.19 ms 435.86 ms 27.67 ms
e763471+dirty 538.31 ms 574.44 ms 36.13 ms
40c9884+dirty 453.76 ms 478.98 ms 25.22 ms

App size

Revision Plain With Sentry Diff
100ce80+dirty 48.30 MiB 53.46 MiB 5.15 MiB
0bd8916+dirty 48.30 MiB 53.57 MiB 5.26 MiB
5ca03f9+dirty 49.74 MiB 55.26 MiB 5.52 MiB
5c1e987+dirty 43.94 MiB 48.94 MiB 5.00 MiB
27d9693+dirty 49.74 MiB 55.09 MiB 5.34 MiB
3b6e9f9+dirty 48.30 MiB 53.54 MiB 5.23 MiB
0a9e622+dirty 49.74 MiB 55.09 MiB 5.34 MiB
882f8ae+dirty 48.30 MiB 53.60 MiB 5.29 MiB
e763471+dirty 49.74 MiB 54.85 MiB 5.11 MiB
40c9884+dirty 49.74 MiB 55.09 MiB 5.34 MiB

Previous results on branch: antonis/feat/expo-updates-timing

Startup times

Revision Plain With Sentry Diff
777ab8e+dirty 584.00 ms 607.29 ms 23.29 ms

App size

Revision Plain With Sentry Diff
777ab8e+dirty 49.74 MiB 55.26 MiB 5.52 MiB

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 822cceb. Configure here.

@lucas-zimerman lucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonis
antonis merged commit 2cac31b into main Jul 28, 2026
100 checks passed
@antonis
antonis deleted the antonis/feat/expo-updates-timing branch July 28, 2026 14:33
antonis added a commit to getsentry/sentry-docs that referenced this pull request Jul 30, 2026
## DESCRIBE YOUR PR

Documents the new `app.update.check` and `app.update.download`
performance spans added to the Expo Updates listener integration in
[sentry-react-native#6430](getsentry/sentry-react-native#6430).

Changes:
- Added a **Performance Spans** section to the Expo Updates page
covering span names, operations, success/failure behavior,
`expo.update.id` attribute, and `forceTransaction` rationale
- Updated the page description and Expo guide index link to mention
performance spans

## IS YOUR CHANGE URGENT?

- [ ] Urgent deadline (GA date, etc.)
- [ ] Other deadline
- [x] None: Not urgent, can wait up to 1 week+

⚠️ Should be merged after
getsentry/sentry-react-native#6430 is shipped

## PRE-MERGE CHECKLIST

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add download/apply timing to Expo Updates listener integration

2 participants