React Native
How the React Native SDK sits on top of the Android and Apple SDKs, which packages it is made of, and the order to read these pages in.
The Sophonz React Native SDK is a set of bindings over the Sophonz Android SDK and Apple SDK. JavaScript errors, logs, network requests and spans cross a native module into those SDKs, so they share one session, one device identity and one delivery path with everything the native SDKs capture on their own.
How it fits together
There is no telemetry pipeline in JavaScript. When your code calls logError or ends a span, the call goes over the React Native bridge and the native SDK records it. Storage, retries, crash resurrection and the conversion to OTLP all happen natively, and the collector receives OTLP/JSON from the device exactly as it would from a native app.
That has three consequences worth knowing before you start:
- Configuration is native. Android reads its collector URL and app key from
sophonz-config.jsonat build time. iOS takes them from JavaScript,Sophonz-Info.plistor native code. A missing key is a native problem, and nothing in JavaScript will report it. - Native capture comes for free. Crashes, ANRs, network requests made by
fetchandXMLHttpRequest, and app lifecycle are captured by the native SDKs whether or not JavaScript ever calls anything. - Whoever starts the SDK first configures it. If the SDK is started in
MainApplicationor theAppDelegate, the options passed toinitializein JavaScript are ignored without a warning.
Packages
| Package | What it does |
|---|---|
@sophonz/react-native | Starts the SDK, installs the global JS error handler, logs, breadcrumbs, sessions, users, manual network recording. Includes the Expo config plugin and the setup wizard |
@sophonz/react-native-tracer-provider | An OpenTelemetry TracerProvider whose spans are recorded by the native SDKs |
@sophonz/react-native-navigation | Screen spans for expo-router, React Navigation and react-native-navigation |
@sophonz/react-native-redux | A span per dispatched Redux action |
@sophonz/react-native-otlp | Additional OTLP/HTTP exporters, for sending the same telemetry to a second backend |
Only the first is required. The navigation and Redux packages need the tracer provider.
Versions
| Component | Version | Source |
|---|---|---|
@sophonz/* React Native packages | 0.1.0 | npm |
| Sophonz Android SDK | 1.0.0 | GitHub Packages (credentials required) |
Sophonz Apple SDK (SophonzIO) | 1.0.0 | git tag v1.0.0 of sophonz-apple-sdk |
All five npm packages are released together and share a version. The native versions are pinned by the React Native packages; you do not choose them separately.
Reading order
- Installation — packages, native SDK access, Expo, bare React Native, starting the SDK
- Configuration — where the collector URL and app key live on each platform, and every option
- Instrumentation — what is captured without code, and what each package adds
- Networking and distributed tracing — request capture,
traceparent, joining backend traces - Navigation — screen spans for expo-router, React Navigation and react-native-navigation
- Redux — the action middleware and what it records
- OpenTelemetry and OTLP — custom spans with the OpenTelemetry API, extra exporters
- API reference — every export and where the two platforms differ
- Release builds and symbolication — JS bundles, R8 mappings and dSYMs
- Examples — a complete start sequence and common patterns
TIP — This is just the beginning
Now ship your app. Sophonz surfaces the problems real users hit — so your app evolves on its own.