This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

Expo Observe iconExpo Observe

A library that collects app performance metrics and user-defined events and dispatches them to EAS Observe.

Android
iOS
tvOS
Recommended version:
~56.0.30

expo-observe is a library that collects performance metrics and user-defined events from your app and dispatches them to EAS Observe, a performance monitoring service from Expo, or to your preferred OpenTelemetry (OTEL)-compliant backend. It measures real-world startup performance, such as Time to First Render (TTR) and Time to Interactive (TTI), from apps running in production.

Beyond app startup metrics, the library can also:

Installation

Terminal
- npx expo install expo-observe
- yarn expo install expo-observe
- pnpm expo install expo-observe
- bun expo install expo-observe

If you are installing this in an existing React Native app, make sure to install expo in your project.

Configuration

In release builds, installing the expo-observe library is all that is needed to configure the library to start sending startup metrics (though you will need to follow the usage instructions below to call markInteractive to track TTI). The library will not dispatch events in debug builds, but you can change this and other config options such as sample rate, environment name and enabling integrations with the Observe.configure({}) call. For all available options, see the EAS Observe configuration guide.

Usage

Wrap your root layout with ObserveRoot to measure Time to First Render automatically. Then, call markInteractive when your app is ready for user interaction to record Time to Interactive:

src/app/_layout.tsx
import { ObserveRoot, useObserve } from 'expo-observe'; import { Stack } from 'expo-router'; import { useEffect } from 'react'; function RootLayout() { const { markInteractive } = useObserve(); useEffect(() => { // Replace this effect with your own readiness signal: only call // markInteractive() after initialization work behind the splash screen // (such as loading initial data) completes. markInteractive(); }, [markInteractive]); return <Stack />; } export default ObserveRoot.wrap(RootLayout);

For step-by-step instructions, including a complete splash screen example and how to handle apps with multiple entry screens, see the EAS Observe Get started guide. To send custom events from your app, see User-defined events.

API

import { Observe, ObserveRoot, useObserve } from 'expo-observe';

No API data file found, sorry!