Expo Updates

Automatic context, breadcrumbs, performance spans, and alerts for Expo OTA updates.

When you ship OTA updates with Expo Updates, events captured by Sentry are automatically enriched with information about which update is running. This lets you filter issues by update channel, runtime version, or update ID — track how long update checks and downloads take — and get alerted when an emergency launch occurs.

These integrations are enabled by default in Expo projects. No additional setup is required.

Every Sentry event includes an ota_updates context with the current update state:

FieldDescription
update_idUUID of the currently running OTA update
channelExpo Updates channel (for example, production, staging)
runtime_versionRuntime version of the update
is_enabledWhether Expo Updates is enabled
is_embedded_launchWhether the app launched from the embedded bundle
is_using_embedded_assetsWhether the app is using embedded assets
is_emergency_launchWhether this was an emergency launch (fallback to embedded)
emergency_launch_reasonReason for the emergency launch (if applicable)
check_automaticallyAutomatic update check policy
launch_durationHow long the update launch took (ms)
created_atWhen the update was created

The SDK also sets the following tags on every event so you can filter and group issues in Sentry:

TagValue
expo.updates.update_idUUID of the running update
expo.updates.channelUpdate channel name
expo.updates.runtime_versionRuntime version string

To find all issues from a specific update channel, use expo.updates.channel:production in the Sentry issue search.

The SDK automatically records breadcrumbs as the Expo Updates state machine progresses. These breadcrumbs appear on subsequent error events and help you understand what was happening with updates before a crash or error occurred.

All breadcrumbs use the category expo.updates and include the following transitions:

Breadcrumb MessageLevelAdditional Data
Checking for updateinfo—
Update availableinfoupdateId
Downloading updateinfo—
Update downloadedinfoupdateId
Restarting for updateinfo—
Update check failederrorerror
Update download failederrorerror
Rollback directive receivedwarningcommitTime

The SDK automatically creates performance spans that measure how long update checks and downloads take. These spans appear as standalone transactions in the Performance page and can be queried in Discover.

Span NameOperationCreated When
expo-updates checkapp.update.checkThe app starts checking for an available update
expo-updates downloadapp.update.downloadThe app starts downloading an update

Each span ends when the corresponding operation completes or fails:

  • Success: The span finishes with an ok status. If an update was found (check) or downloaded, the expo.update.id attribute is set to the manifest ID.
  • Failure: The span finishes with an error status and the error message from the Expo Updates state machine.

Spans are created with forceTransaction: true because OTA update checks typically happen outside of user-interaction transactions (for example, at app startup). This means each check or download appears as its own transaction in Sentry rather than as a child span of another trace.

Expo Updates performs an emergency launch when it fails to load the latest OTA update and falls back to the embedded bundle. This can silently degrade user experience.

When the SDK detects an emergency launch at startup, it automatically sends a warning-level event to Sentry with:

  • Message: Expo Updates emergency launch: <reason> (or Expo Updates emergency launch if no reason is available)
  • Tag: expo.updates.emergency_launch: true

You can set up a Sentry alert on this tag to get notified whenever an emergency launch happens in production.

When your app applies an OTA update at runtime by calling Updates.reloadAsync(), the JavaScript bundle is reloaded and Sentry.init() runs again. Flush pending events before reloading so anything still queued on the JS side is sent first:

Copied
import * as Sentry from "@sentry/react-native";
import * as Updates from "expo-updates";

async function applyUpdate() {
  // Send pending events before the JS bundle reloads
  await Sentry.flush();
  await Updates.reloadAsync();
}

Updates.reloadAsync() reloads the JavaScript bundle without restarting the native process. This distinction matters for Sentry:

  • Native SDK: The native (iOS/Android) SDK is not restarted, so it keeps running across the reload. Native crash handling stays active and the native scope is retained.
  • JavaScript SDK: The JS runtime restarts, so Sentry.init() runs again in the new bundle and the JS-side scope and breadcrumbs start fresh.
  • Active spans: Performance spans still in progress on the JS side don't survive the runtime restart, so they aren't sent. Finish and flush any span you care about before reloading.
  • Updates context: After re-initialization, the ota_updates context and expo.updates.* tags reflect the newly applied update.

By default, Expo Updates applies a downloaded update on the next app launch (cold start) rather than at runtime. We recommend keeping this default: it lets the SDK initialize cleanly against the new bundle and avoids interrupting active sessions or dropping in-progress spans.

If you apply an update immediately with Updates.reloadAsync() (for example, for a critical hotfix), call Sentry.flush() first.

The SDK automatically captures Expo Constants as an expo_constants context on every event. This provides metadata about the execution environment and app configuration:

FieldDescription
execution_environmentWhere the app is running (storeClient, standalone, bare)
app_ownershipWhether the app runs in Expo Go or standalone
debug_modeWhether debug mode is enabled
expo_versionExpo client version
expo_runtime_versionRuntime version from app config
session_idCurrent session ID
status_bar_heightHeight of the status bar (px)
app_nameApp name from app.json
app_slugApp slug from app.json
app_versionApp version from app.json
expo_sdk_versionExpo SDK version
eas_project_idEAS project ID
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").