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
A library that collects app performance metrics and dispatches them to EAS Observe.
EAS Observe includes 100,000 events per month on the Free plan and 500,000 on paid plans, roughly 10,000 and 50,000 monthly active users. Beyond that, pricing is usage-based. See Pricing for details.
expo-observe is a library that collects performance metrics 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.
expo-observeis not available in Expo Go. To use it, create a development build.
Installation
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 AppMetrics.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 and environment name with the AppMetrics.configure({}) call. For all available options, see the EAS Observe configuration guide.
Usage
On SDK 55, wrap your root layout with AppMetricsRoot to measure Time to First Render automatically. Then, call AppMetrics.markInteractive when your app is ready for user interaction to record Time to Interactive:
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.
User-defined events and the navigation integrations require SDK 56 and later.
API
import { AppMetrics, AppMetricsRoot } from 'expo-observe';
Component
Type: React.Element<{
children: ReactNode
}>
A root component that automatically marks the first render.
Wrap your app's root component with this to measure time to first render
without manually calling AppMetrics.markFirstRender().
Interfaces
Configures how observability events are collected and dispatched at runtime, such as the environment label, dispatching behavior, and sampling.
voidExample
import Observe from 'expo-observe'; Observe.configure({ environment: 'production', dispatchingEnabled: true, });
Dispatches pending events to the server immediately.
Events are dispatched automatically when the app moves to the background. On Android, a background worker dispatches events once network connectivity is available. On iOS, dispatching happens when the app resigns active state or is about to terminate. Call this method to flush events manually, for example, during testing or to ensure events are sent before a specific point.
Promise<void>A promise that resolves when the pending events have been dispatched.
Example
import Observe from 'expo-observe'; await Observe.dispatchEvents();