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 Expo Observe.

Android
iOS
tvOS

expo-observe is a library that collects performance metrics and user-defined events from your app and dispatches them to Expo 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 Expo 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 Expo Observe Get started guide. To send custom events from your app, see User-defined events.

API

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

Components

ObserveErrorBoundary

Android
iOS
tvOS

Type: React.Component<AppMetricsErrorBoundaryProps, State>

A React error boundary that records render-phase errors as non-fatal js.exception log events (with the React component stack) and renders a fallback in place of the subtree that threw.

Render-phase errors don't reach global.ErrorUtils, so a boundary is the only way to capture them with the component stack. Place one around any subtree, or let AppMetricsRoot mount one via its errorBoundaryFallback prop.

ObserveInteractiveMarker

Android
iOS
tvOS

Type: React.Element<ObserveInteractiveMarkerProps>

Declarative wrapper around useObserve().markInteractive(...). Renders nothing and calls markInteractive once when it first mounts, marking the moment the screen becomes interactive (used to compute the tti metric). Render it once the screen is ready for user interaction — for example, after its initial data has loaded.

Because markInteractive is only sent on mount, the marker is fire-once: changing params after the first render has no effect and warns in development. If you need to attach attributes that are only known later, call useObserve().markInteractive(...) imperatively instead.

Example

import { ObserveInteractiveMarker } from 'expo-observe'; function Feed({ items }) { if (!items) return <Spinner />; return ( <> <FeedList items={items} /> <ObserveInteractiveMarker params={{ cacheHit: true }} /> </> ); }

ObserveInteractiveMarkerProps

params

Android
iOS
tvOS
Optional • Type: MetricAttributes[params]

Custom parameters attached to the TTI metric, forwarded to markInteractive. Values can be strings, numbers, booleans, or other JSON-serializable values.

ObserveRoot

Android
iOS
tvOS

Type: React.Element<AppMetricsRootProps & { children: ReactNode }>

Static methods

getDerivedStateFromError(error)

Android
iOS
tvOS
ParameterType
errorunknown

Returns:
State

Component methods

wrap(Component)

Android
iOS
tvOS
ParameterType
ComponentComponentType<P>

Returns:
ComponentType<P>

Hooks

useObserve()

Android
iOS
tvOS
Returns:
{ markInteractive: (attributes: MetricAttributes) => void }

Interfaces

ExpoAppMetricsModuleType

Android
iOS
tvOS
PropertyTypeDescription
NetworkRequestObserverNetworkRequestObserver

Class for subscribing to HTTP requests observed by the native networking interceptor. Construct an instance to begin receiving requestStarted/requestCompleted events; release the instance (drop all references) to stop.

ExpoAppMetricsModuleType Methods

clearStoredEntries()

Android
iOS
tvOS
Returns:
Promise<void>

logEvent(name, options)

Android
iOS
tvOS
ParameterTypeDescription
namestring

Event name. Maps to the OpenTelemetry event.name attribute.

options(optional)LogEventOptions

Optional body, attributes, and severity overrides.


Records a log event against the current main session. The event is persisted locally and dispatched on the next dispatchEvents() flush as an OpenTelemetry log record sent to the /v1/logs endpoint.

Severity defaults to "info" when not provided.

Returns:
void

markFirstRender()

Android
iOS
tvOS
Returns:
void

markInteractive(attributes)

Android
iOS
tvOS
ParameterType
attributes(optional)MetricAttributes

Returns:
void

setGlobalAttributes(attributes)

Android
iOS
tvOS
ParameterType
attributes(optional)Record<string, LogAttributeValue> | null

Sets attributes merged into every subsequent metric and log event. Per-record keys win on collision. Pass null, undefined, or an empty object to clear.

Returns:
void

Example

AppMetrics.setGlobalAttributes({ subscription_tier: 'pro', experiment_variant: 'B', });

ObserveIntegrationsConfig

Android
iOS
tvOS
PropertyTypeDescription
expo-router(optional)boolean | ObserveNavigationIntegrationConfig

Enables the expo-router integration, which records navigation metrics (cold_ttr, warm_ttr, tti, tbt) from router state changes.

Requires expo-router to be installed.

Pass an object to filter exported route/query params.

Default:false
react-native-reanimated(optional)boolean | ObserveReanimatedIntegrationConfig

Enables the react-native-reanimated integration, which reports Reanimated errors to Observe as errors named reanimated.error. To also report Reanimated warnings as events named reanimated.warning, set reportWarnings. Reanimated still prints errors and warnings to the console. The integration reports each distinct message at most once every 15 minutes. It reports at most 20 distinct errors and 20 distinct warnings in any 15-minute period.

Requires react-native-reanimated 4.7.0 or later to be installed.

The integration configures Reanimated's logger with configureReanimatedLogger. To set the logger's level and strict options, pass an object here. Don't call configureReanimatedLogger in your app. A later call removes the integration's callback, and the integration replaces the level and strict options of an earlier call.

Default:false
react-navigation(optional)boolean | ObserveNavigationIntegrationConfig

Enables the @react-navigation/native integration, which records navigation metrics (cold_ttr, warm_ttr, tti, tbt).

Requires @react-navigation/native to be installed and the app tree to be wrapped in <ObserveNavigationContainer> instead of the stock <NavigationContainer>.

Pass an object to filter exported route/query params.

Default:false

ObserveModule

Android
iOS
tvOS

Extends: NativeModule<ObserveModuleEvents>

PropertyTypeDescription
clientIdstring | null
Only for: 
Android
iOS

The Expo Services client id: a random, pseudonymous identifier for this app installation, shared by all Expo Services client libraries. Observe records it on every metric and log event as the expo.eas_client.id attribute, so use it to correlate Observe data with another service.

The id is stored in native preferences and is stable across app launches and app updates. It changes when the app's data is cleared or the app is reinstalled, although a backup restore can carry the previous id over. It identifies an installation, not a user or a device.

null on web, where there is no Expo Services client id. Reading the id creates it on the device when it does not exist, also while consent is not granted. A revoke keeps the id.

Example

import { Observe } from 'expo-observe'; // Attach the same id to data you send elsewhere to line it up with Observe. await fetch('https://example.com/events', { method: 'POST', body: JSON.stringify({ easClientId: Observe.clientId }), });

ObserveModule Methods

configure(config)

Android
iOS
tvOS
ParameterTypeDescription
configObserveConfig

Observability settings to apply.


Configures how observability events are collected and dispatched at runtime, such as the environment label, dispatching behavior, sampling, and integrations.

Returns:
void

Example

import { Observe } from 'expo-observe'; Observe.configure({ environment: 'production', dispatchingEnabled: true, });

dispatchEvents()

Android
iOS
tvOS

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.

Returns:
Promise<void>

A promise that resolves once the events have been dispatched. A call made while another dispatch is running waits for it to finish first.

Example

import { Observe } from 'expo-observe'; await Observe.dispatchEvents();

getIntegrations()

Android
iOS
tvOS

Returns the integrations config from the most recent configure(...) call, or an empty object if configure has not run yet.

logEvent(name, options)

Android
iOS
tvOS
ParameterTypeDescription
namestring

Event name.

options(optional)LogEventOptions

Optional body, attributes, and severity overrides.


Records a log event against the current main session. The event is persisted locally and dispatched on the next dispatchEvents() flush.

Severity defaults to "info" when not provided.

Returns:
void

markFirstRender()

Android
iOS
tvOS

Marks the first render of the app. Used to compute the cold_ttr and warm_ttr metrics.

Returns:
void

markInteractive(attributes)

Android
iOS
tvOS
ParameterType
attributes(optional)MetricAttributes

Marks the moment the app becomes interactive. Used to compute the tti metric. Custom routeName and params can be attached via attributes.

Returns:
void

recordSpan(name, options)

Android
iOS
tvOS
ParameterTypeDescription
namestring

A short, stable name for the operation. Observe does not record the span when the name is empty, starts with the reserved expo. prefix, or is longer than 256 characters.

optionsRecordSpanOptions

The start and end times in Unix epoch milliseconds (both required), optional attributes, and an optional parent span


Records a span for an operation that you already measured. The result is the same as startSpan followed immediately by end(), with the times that you supply.

Observe does not record the span when startTime or endTime is missing or is not in Unix epoch milliseconds. The same applies when endTime is before startTime. In each case, Observe logs a warning. A value from performance.now() is not a Unix epoch time, so use Date.now(). This method never throws.

Returns:
void

Example

import { Observe } from 'expo-observe'; const startTime = Date.now(); decodeImage(); Observe.recordSpan('image-decode', { startTime, endTime: Date.now() });

registerIntegration(name, callback)

Android
iOS
tvOS
ParameterTypeDescription
nameK

Integration name.

callback(config: ObserveIntegrationsConfig[K]) => void

Function called with the integration configuration.


Invokes a callback once when the named integration configuration becomes available.

Returns:
void

Example

Observe.registerIntegration('expo-router', config => { console.log(config); });

reportError(error)

Android
iOS
tvOS
ParameterTypeDescription
errorunknown

The caught value. An Error is preferred, but any thrown value is accepted.


Reports an error your code caught and handled, recorded as a non-fatal exception event. Use it to keep visibility into failures you recover from, which never reach the automatic global handler or an error boundary.

The thrown value is normalized: an Error's name, message, and stack are captured; any other value (a string, a plain object) is stringified as the message.

Returns:
void

Example

try { await syncCart(); } catch (error) { Observe.reportError(error); }

reportFeedback(feedback)

Android
iOS
ParameterTypeDescription
feedbackObserveFeedback

The feedback to report.


Reports feedback from a user as an expo.feedback event. Every installation sends feedback: sampleRate and errorSampleRate do not apply to it. dispatchingEnabled, dispatchInDebug, and ignoredEvents apply to it the same way as to other events.

reportFeedback drops the report and prints a warning in development when id is empty, when the report has neither message nor rating (an empty message counts as none), when rating is not a whole number within scale, when scale is not valid or has no rating, or when an argument has the wrong type.

Returns:
void

Example

Observe.reportFeedback({ id: 'checkout', message: 'The pay button is hard to find.', rating: 6 });

setBundleDefaults(defaults)

Android
iOS
tvOS
ParameterType
defaults{ environment: string, isJsDev: boolean }

Pushes JS-bundle-derived facts (process.env.NODE_ENV, __DEV__) into native storage. Called automatically once when the package is first imported; should not be called by host apps directly.

Returns:
void

setConsent(consent)

Android
iOS
ParameterTypeDescription
consentObserveConsent

The new consent value.


Changes whether the user consents to Observe collecting data. The device saves the value, and it overrides the consent option of the expo-observe config plugin on later launches.

A grant starts collection and saves the startup metrics of the current launch. A revoke stops collection and deletes the Observe data stored on the device, but keeps clientId. A call with the current value leaves collection unchanged.

Observe starts collection at most one time in each app launch. After a revoke, a grant only saves the value, and collection starts at the next launch.

Returns:
Promise<void>

A promise that resolves when the change is applied. Calls are applied one at a time, in call order. On Android, the promise rejects if the device cannot save the value, even for the current value. In that case, a revoke still stops collection and deletes stored data, and a grant leaves collection unchanged.

Example

import { Observe } from 'expo-observe'; await Observe.setConsent(userAccepted ? 'granted' : 'not-granted');

setGlobalAttributes(attributes)

Android
iOS
tvOS
ParameterType
attributes(optional)ObserveAttributes | null

Sets attributes merged into every subsequent metric and log event. Per-record keys win on collision. Pass null, undefined, or an empty object to clear.

Returns:
void

Example

Observe.setGlobalAttributes({ subscription_tier: 'pro', experiment_variant: 'B', });

startSpan(name, options)

Android
iOS
tvOS
ParameterTypeDescription
namestring

A short, stable name for the operation, for example, 'checkout'. Observe does not record the span when the name is empty, starts with the reserved expo. prefix, or is longer than 256 characters.

options(optional)StartSpanOptions

Initial attributes, a parent span, and an optional start time


Starts a trace span for an operation that is underway, and returns the span. The span gets its trace ID and span ID immediately, so you can pass it as parent to other spans before it ends.

Observe saves the span when you call end(), and sends it with the next dispatch as part of the current session. If you never call end(), Observe never sends the span.

This method never throws. When it cannot record the span, it logs a warning. The span that it returns still accepts every call.

Returns:
Span

The span. Call end() on it when the operation finishes.

Example

import { Observe } from 'expo-observe'; const span = Observe.startSpan('checkout', { attributes: { 'cart.items': 3 } }); span.addEvent('cart-validated'); span.end();

withSpan(name, callback, options)

Android
iOS
tvOS
ParameterTypeDescription
namestring

A short, stable name for the operation. Observe does not record the span when the name is empty, starts with the reserved expo. prefix, or is longer than 256 characters. The callback still runs.

callback(span: Span) => T | Promise<T>

The operation to measure. It can be synchronous or asynchronous.

options(optional)StartSpanOptions

Initial attributes, a parent span, and an optional start time


Runs callback inside a span. The span starts first and ends when the callback returns or its promise settles.

When the callback throws or its promise rejects, the span ends with the 'error' status and the error message. The returned promise then rejects with the same error, so your own error handling still works. An error inside Observe never changes the result: the returned promise settles the same way as the callback.

The callback receives the span. Use the span to add attributes and events, and pass it as parent to nested spans. Observe does not nest spans automatically. A span that you start inside the callback without parent begins its own trace.

Returns:
Promise<T>

A promise fulfilled with the result of the callback

Example

import { Observe } from 'expo-observe'; const receipt = await Observe.withSpan('checkout', async (span) => { await Observe.withSpan('validate-cart', () => validateCart(), { parent: span }); span.addEvent('cart-validated'); return submitOrder(); });

Span

Android
iOS
tvOS

Extends: SharedObject

Represents an operation that you measure. startSpan returns a span, and withSpan passes one to its callback. While the operation runs, the span collects attributes and events. Pass the span as parent to start a nested span.

Calling end() saves the span. If you never call end(), Observe never sends the span.

PropertyTypeDescription
spanIdstring

Span ID, as 16 lowercase hexadecimal characters

traceIdstring

Trace ID, as 32 lowercase hexadecimal characters. Spans that you start with this span as parent share it.

Span Methods

addEvent(name, options)

Android
iOS
tvOS
ParameterTypeDescription
namestring

The event name, for example, 'cart-validated'

options(optional)SpanEventOptions

Event attributes and an optional event time


Adds a point-in-time event to the span, such as a checkpoint inside the measured operation. Observe drops the event and logs a warning when its name is empty, starts with the reserved expo. prefix, or is longer than 256 characters. At most 32 events of a span reach the server.

Has no effect after end().

Returns:
void

Example

span.addEvent('cart-validated', { attributes: { 'cart.items': 3 } });

end(options)

Android
iOS
tvOS
ParameterTypeDescription
options(optional)SpanEndOptions

An optional status, an error message for the 'error' status, and an optional end time


Ends the span and saves it. Observe sends the span with the next dispatch. Only the first call has an effect. Later calls log a warning and do nothing.

Returns:
void

Example

try { await submitOrder(); span.end(); } catch (error) { span.end({ status: 'error', message: String(error) }); throw error; }

setAttributes(attributes)

Android
iOS
tvOS
ParameterTypeDescription
attributesRecord<string, LogAttributeValue>

Attribute names mapped to values. A value can be a string, number, boolean, array, or nested object.


Adds attributes to the span. Setting a key again replaces its value. Attributes go through the same validation as logEvent attributes: Observe drops empty keys and keys in the reserved expo.* namespace, and logs a warning.

Has no effect after end().

Returns:
void

Example

span.setAttributes({ 'cart.items': 3, 'payment.method': 'card' });

Types

AppMetricsErrorBoundaryFallbackProps

Android
iOS
tvOS

Arguments passed to a fallback render function.

PropertyTypeDescription
errorunknown

The value the subtree threw. Usually an Error, but any value can be thrown.

resetError() => void

Clears the caught error and re-renders the children. Use it to offer a "try again" action; the children re-mount, so they run from a clean state.

AppMetricsErrorBoundaryProps

Android
iOS
tvOS
PropertyTypeDescription
childrenReact.ReactNode
-
fallbackReact.ReactElement | null | (props: AppMetricsErrorBoundaryFallbackProps) => React.ReactNode

Rendered in place of the subtree after an error is caught. Provide one of:

  • a React element to render as-is,
  • a function receiving the error and a resetError callback (to show details and offer retry),
  • null to render nothing.

A boundary can't re-throw to reproduce React Native's default crash, so it always renders one of the above; there's no capture-only mode. Errors no boundary catches are still recorded by the global ErrorUtils handler.

AppMetricsRootProps

Android
iOS
tvOS
PropertyTypeDescription
childrenReact.ReactNode
-
errorBoundaryFallback(optional)AppMetricsErrorBoundaryProps[fallback]

When set, the app is wrapped in an AppMetricsErrorBoundary with this fallback, capturing React render-phase errors at the root. Omit it and no boundary is mounted, so render errors keep React Native's default behavior (they're still recorded by the global ErrorUtils handler, just without the component stack). Pass null to capture but render nothing.

To place a boundary deeper in the tree, use AppMetricsErrorBoundary directly.

LogAttributeValue

Android
iOS
tvOS

Value types accepted in a log event's attributes map. Strings, numbers, and booleans are stored as typed primitives; arrays and nested maps preserve their structure. Other JS values (functions, Date, undefined, etc.) are not supported and may be dropped by downstream consumers.

Type: string or number or boolean or object shaped as below:

PropertyTypeDescription
key(index signature)LogAttributeValue
-

LogEventOptions

Android
iOS
tvOS

Optional configuration accepted by logEvent. The event name is passed as the first positional argument since it's required and the only field most callers set.

PropertyTypeDescription
attributes(optional)Record<string, LogAttributeValue> | null

Custom attributes attached to the event. Each entry is preserved with its original value type — see LogAttributeValue for the supported shapes.

body(optional)string | null

Optional free-form message describing the event.

displayName(optional)string | null

Optional human-friendly label for the event. Unlike name (a stable machine identifier), this is meant for display in dashboards and is not constrained to a naming scheme.

severity(optional)LogSeverity | null

Severity of the event.

Default:"info"

LogSeverity

Android
iOS
tvOS

Literal type: string

Severity of a log event, ordered from least to most severe:

  • "trace" — Fine-grained tracing, typically only useful while reproducing a specific issue.
  • "debug" — Diagnostic detail useful during development; usually filtered out in production.
  • "info" — Routine, expected events that record normal app behavior.
  • "warn" — Unexpected but recoverable conditions worth investigating.
  • "error" — An operation failed; the app continues running but is in a degraded state.
  • "fatal" — A severe failure, often immediately followed by app termination.

Acceptable values are: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal'

MetricAttributes

Android
iOS
tvOS
PropertyTypeDescription
params(optional)Record<string, unknown>

Custom parameters to attach to the metric.

routeName(optional)string | null

Name of the route associated with the metric. Some metrics populate this with a sensible default when omitted — for example, the TTI metric falls back to the initial route name detected from the router.

ObserveAttribute

Android
iOS
tvOS

Type: LogAttributeValue

Value types accepted as attribute values in setGlobalAttributes and the other Observe APIs. Strings, numbers, and booleans are stored as typed primitives; arrays and nested maps preserve their structure.

ObserveAttributes

Android
iOS
tvOS

Type: Record<string, ObserveAttribute>

A map of attribute key to value, as accepted by setGlobalAttributes and other Observe APIs that take a free-form attributes payload.

ObserveConfig

Android
iOS
tvOS
PropertyTypeDescription
dispatchInDebug(optional)boolean

Whether to dispatch metrics that were collected in a debug build of the host app.

When false, metrics produced by debug builds are marked as sent without being dispatched. When true, debug-build metrics are dispatched alongside release-build metrics.

Has no effect on release builds.

If dispatchingEnabled is false, nothing is dispatched regardless of dispatchInDebug. sampleRate and errorSampleRate also apply in debug builds.

Default:false
dispatchingEnabled(optional)boolean

Whether to dispatch observability events to the server.

When false, any pending metrics are marked as sent without being dispatched and no further metrics are dispatched until this is set back to true.

Default:true
environment(optional)string

The environment for observability events

Default:process.env.NODE_ENV
errorHandlingEnabled(optional)boolean

Whether to record unhandled JavaScript errors as exception log events.

When false, unhandled errors are no longer recorded. React Native's own handling is unaffected either way: the red box in development and fatal termination in production still happen. Errors you report yourself with reportError, and render-phase errors captured by ObserveErrorBoundary, are also unaffected.

Default:true
errorSampleRate(optional)number

Fraction of installations that should dispatch errors, in [0, 1]. Values outside that range are clamped. Use it to keep more errors than other events, for example, sampleRate: 0.03 with errorSampleRate: 1.

Errors include unhandled JavaScript errors, errors from reportError and ObserveErrorBoundary, and native crash reports. Every installation sends feedback from reportFeedback. All other events follow sampleRate.

errorSampleRate is a minimum. Installations in-sample for sampleRate always send errors. A lower value has no effect, and configure() prints a warning. An unset sampleRate counts as 1.

dispatchingEnabled and dispatchInDebug apply to errors the same way as to other events.

Default:undefined - errors follow `sampleRate`
ignoredEvents(optional)ObserveEventName[]

Event names that are not sent, including custom names passed to logEvent. Each configure call replaces the list.

Default:[]
ignoredMetrics(optional)ObserveMetricName[]

Metric names that are not sent. Each configure call replaces the list.

Default:[]
integrations(optional)ObserveIntegrationsConfig

Opt in to per-integration behavior. See the Expo Router and React Navigation integrations, or integrate your own package.

networkTraces(optional)boolean | ObserveNetworkTracesConfig

Whether network requests are recorded as trace spans. Pass true to record every request, or an object to record only the ones matching a filter.

Off by default, because each recorded span counts toward your event quota. This controls recording, not just export: a request that's turned off or filtered out never reaches the local database. It applies to future requests only, so anything recorded earlier in the launch still gets sent. The setting persists across launches.

Default:false
sampleRate(optional)number

Fraction of installations that should dispatch metrics, in [0, 1]. Values outside that range are clamped.

The decision is deterministic per installation — a device is either permanently in-sample or out-of-sample for a given rate, so the choice is stable across app launches.

Interaction with dispatchingEnabled:

  • If dispatchingEnabled is false, metrics are never dispatched
  • If dispatchingEnabled is true (or unset), metrics are dispatched only when this device is in-sample.

Errors follow errorSampleRate when it is set and higher. Every installation sends feedback from reportFeedback.

Default:undefined - metrics from all devices are sent

ObserveConsent

Android
iOS
tvOS

Literal type: string

Whether the user consents to Observe collecting data. The consent option of the expo-observe config plugin sets the value for the first launch, and setConsent changes it at runtime.

Acceptable values are: 'not-granted' | 'granted'

ObserveEventName

Android
iOS
tvOS

Literal type: string

Name of an event that Expo Observe sends. You can also pass a custom name to logEvent.

Acceptable values are: 'js.exception' | 'native.exception' | 'expo.feedback' | 'reanimated.warning' | 'expo-image.oversized'

ObserveFeedback

Android
iOS
tvOS

User feedback sent by reportFeedback. Set message, rating, or both.

PropertyTypeDescription
attributes(optional)ObserveAttributes

Attributes attached to the event. They follow the same rules as logEvent attributes. If the event has more than 128 attributes in total, the expo.* attributes are kept first.

idstring

Where the feedback is collected, for example, 'checkout'. Many reports can use the same id. Sent as the expo.feedback.id attribute.

message(optional)string

Text that the user wrote. Sent as the event body. Text longer than 4096 characters is cut.

rating(optional)number

A whole number from scale.min to scale.max. Sent as the expo.feedback.rating attribute.

scale(optional){ max: number, min: number }

The lowest and the highest rating your UI allows, as whole numbers from 0 to 10. min must be less than max. Set it only with a rating. Sent as the expo.feedback.scale.min and expo.feedback.scale.max attributes. The dashboard uses the scale to compare ratings.

ObserveMetricName

Android
iOS
tvOS

Literal type: string

Name of a metric that Expo Observe sends

Acceptable values are: 'expo.app_startup.tti' | 'expo.app_startup.ttr' | 'expo.app_startup.cold_launch_time' | 'expo.app_startup.warm_launch_time' | 'expo.app_startup.bundle_load_time' | 'expo.updates.download_time' | 'expo.navigation.cold_ttr' | 'expo.navigation.warm_ttr' | 'expo.navigation.tti' | 'expo.navigation.tbt'

ObserveModuleEvents

Android
iOS
tvOS

Events emitted by the native ExpoObserve module.

PropertyTypeDescription
configure(payload: { integrations: ObserveIntegrationsConfig }) => void

Fired on every configure(...) call, carrying the resolved integrations config

ObserveNavigationIntegrationConfig

Android
iOS
tvOS
PropertyTypeDescription
filteredParams(optional)string[]

Route or query parameter keys to remove from exported navigation metric routeParams. When any configured parameter is removed from a metric, the exported resolved URL/path is replaced with urlHidden: true. Does not affect routeName.

ObserveNetworkTracesConfig

Android
iOS
tvOS
PropertyTypeDescription
enabled(optional)boolean

Whether network requests are recorded at all. Set it to false to keep a filter configured while recording nothing.

Default:true
filter(optional)NetworkRequestFilter | null

Only requests matching the filter are recorded. An omitted field matches every request; an empty array matches none.

ObserveReanimatedIntegrationConfig

Android
iOS
tvOS
PropertyTypeDescription
level(optional)'1' | '2'

The minimum log level that Reanimated prints and reports. Pass a ReanimatedLogLevel value from react-native-reanimated: ReanimatedLogLevel.warn (1) or ReanimatedLogLevel.error (2).

Default:ReanimatedLogLevel.warn
reportWarnings(optional)boolean

Whether the integration also reports Reanimated warnings to Observe, as events named reanimated.warning. Reanimated prints warnings to the console either way.

Default:false
strict(optional)boolean

Whether Reanimated also prints and reports its strict-mode warnings.

Default:true

RecordSpanOptions

Android
iOS
tvOS
PropertyTypeDescription
attributes(optional)Record<string, LogAttributeValue> | null

Attributes attached to the span. Values go through the same validation as logEvent attributes.

endTimenumber

Unix-epoch milliseconds when the measured operation ended, such as a value from Date.now().

parent(optional)Span | null

The span this one nests under. The recorded span continues the parent's trace and references its span id. Omit for a root span starting its own trace.

startTimenumber

Unix-epoch milliseconds when the measured operation started, such as a value from Date.now().

SpanEndOptions

Android
iOS
tvOS
PropertyTypeDescription
endTime(optional)number | null

Unix-epoch milliseconds overriding "now" as the span end. A value from performance.now(), or one in seconds or microseconds, is ignored with a warning, and the span ends now.

message(optional)string | null

Free-text detail explaining an 'error' status, such as the failure's message. Ignored for any other status: OpenTelemetry allows a status description only with the error status.

status(optional)SpanStatus | null

'error' marks the operation as failed; 'ok' explicitly marks success. Omit to leave the status unset, the usual choice for successful spans. Any other value is ignored with a warning.

SpanEventOptions

Android
iOS
tvOS
PropertyTypeDescription
attributes(optional)Record<string, LogAttributeValue> | null

Attributes attached to the event. Values go through the same validation as logEvent attributes.

time(optional)number | null

Unix-epoch milliseconds overriding the event time. Without it the event is stamped with the current time when addEvent runs. A value from performance.now(), or one in seconds or microseconds, is ignored with a warning.

SpanStatus

Android
iOS
tvOS

Literal type: string

Status of a completed span. Omitting the status leaves it unset, which is the usual choice for successful operations, per the OpenTelemetry conventions.

Acceptable values are: 'ok' | 'error'

StartSpanOptions

Android
iOS
tvOS
PropertyTypeDescription
attributes(optional)Record<string, LogAttributeValue> | null

Attributes attached to the span at start. Values go through the same validation as logEvent attributes.

parent(optional)Span | null

The span this one nests under. The child continues the parent's trace and references its span id. Omit for a root span starting its own trace. There is no implicit parenting.

startTime(optional)number | null

Unix-epoch milliseconds overriding "now" as the span start, for operations whose start was measured before the call. Take it from Date.now(): a value from performance.now(), or one in seconds or microseconds, is ignored with a warning, and the span starts now.

Reference version