Set up EAS Observe
Edit page
Learn how to install EAS Observe and start collecting performance metrics from your production app.
For the complete documentation index, see llms.txt. Use this file to discover all available pages.
EAS Observe tracks your app's startup performance in production. This guide walks you through installing the library, setting up your app, and viewing your first metrics.
Prerequisites
3 requirements
3 requirements
1.
EAS Observe is available to anyone with an Expo account. You can sign up at expo.dev/signup.
2.
EAS Observe requires SDK 55 or later. Run npx expo-doctor to check your SDK version and npx expo install --fix to update dependencies.
3.
Your app must be linked to an EAS project. Ensure extra.eas.projectId in your app config
includes the project ID, or create one by running eas init.
1
2
Wrap your root layout
Wrap your root layout with AppMetricsRoot (SDK 55) or ObserveRoot (SDK 56 and later). This higher-order component (HOC) automatically measures Time to First Render (TTR) for you.
import { Stack } from 'expo-router'; import { ObserveRoot } from 'expo-observe'; function RootLayout() { return <Stack />; } export default ObserveRoot.wrap(RootLayout);
import { Stack } from 'expo-router'; import { AppMetricsRoot } from 'expo-observe'; function RootLayout() { return <Stack />; } export default AppMetricsRoot.wrap(RootLayout);
3
Mark interactive
Call markInteractive() when your app is fully ready for user interaction. This should be called after any initialization work behind the splash screen completes, such as:
- Checking for updates
- Authenticating the user
- Fetching initial data
- Animating the splash screen
import { Stack } from 'expo-router'; import * as SplashScreen from 'expo-splash-screen'; import { ObserveRoot, useObserve } from 'expo-observe'; import { useEffect, useState } from 'react'; // Keep the splash screen visible while we fetch resources SplashScreen.preventAutoHideAsync(); function RootLayout() { const [isReady, setIsReady] = useState(false); const { markInteractive } = useObserve(); useEffect(() => { async function prepare() { try { await authenticateUser(); await fetchInitialData(); } catch (e) { console.warn(e); } finally { setIsReady(true); } } prepare(); }, []); useEffect(() => { if (isReady) { SplashScreen.hide(); markInteractive(); } }, [isReady, markInteractive]); if (!isReady) { return null; } return <Stack />; } export default ObserveRoot.wrap(RootLayout);
import { Stack } from 'expo-router'; import * as SplashScreen from 'expo-splash-screen'; import { AppMetrics, AppMetricsRoot } from 'expo-observe'; import { useEffect, useState } from 'react'; // Keep the splash screen visible while we fetch resources SplashScreen.preventAutoHideAsync(); function RootLayout() { const [isReady, setIsReady] = useState(false); useEffect(() => { async function prepare() { try { await authenticateUser(); await fetchInitialData(); } catch (e) { console.warn(e); } finally { setIsReady(true); } } prepare(); }, []); useEffect(() => { if (isReady) { SplashScreen.hide(); AppMetrics.markInteractive(); } }, [isReady]); if (!isReady) { return null; } return <Stack />; } export default AppMetricsRoot.wrap(RootLayout);
markInteractive()can safely be called multiple times per session, but only the first call records the measurement. If your app has multiple entry screens (for example, an onboarding flow, login flow, or deep link targets), callmarkInteractiveon every one of these screens. If you only place it on one screen, Time to Interactive (TTI) will not be recorded when the app opens via a deep link to a different screen.
4
Create a new build
After installing expo-observe and adding the instrumentation, create a new build of your app:
- eas buildBy default, metrics collected from debug builds are not dispatched. To test your integration in a debug build, see Enable metrics in development.
5
View your metrics
Open your project and open Observe tab in EAS dashboard to view metrics from your app.
For details on filtering, release comparison, and session investigation, see the Dashboard guide.
You can also query metrics from the terminal using the EAS CLI:
eas observe:versions: Lists app versions along with their build IDs, update group IDs, and release dates. Useful for finding the version identifiers needed to filter the other commands.eas observe:metrics-summary: Shows aggregated performance metric statistics (such as median, p75, and p95 values) grouped by app version. Use this to compare overall startup performance across releases.eas observe:metrics: Shows individual performance metric events ordered by value, including session and device metadata. Use this to investigate specific slow sessions or outliers.eas observe:events: Shows individual events emitted by your app viaObserve.logEvent. See User-defined events for details.
Run any of these commands with --help to see the available flags and arguments.