All posts
Release

TracePath React Native SDK

First release of the TracePath React Native SDK: error tracking for React Native and Expo apps. The wire format is identical to the browser, Android, and Flutter SDKs, so the same TracePath backend ingests reports from every TracePath client.

Features

  • Automatic capture of every uncaught throw via React Native's ErrorUtils global handler. RN's red-box dev overlay still appears, the previous handler is preserved
  • Unhandled promise rejections caught through the same handler
  • Render-time errors caught via <TracePathErrorBoundary>
  • Full Hermes / JavaScriptCore stack traces, normalized to the same wire format the other SDKs emit
  • The last ~10 seconds of console.{debug,log,info,warn,error} attached to every report
  • fetch and XMLHttpRequest wrapped at install time: method, URL, status, duration, byte counts. Calls to the TracePath endpoint itself are skipped to avoid recursion
  • Auto-collected device attributes (os.name, os.version, screen resolution / density, locale, runtime engine) attached to every report
  • Custom breadcrumbs via recordAction(...) and per-app globals via setDeviceAttributes(...)
  • React surface: <TracePathProvider>, <TracePathErrorBoundary>, useTracePath() hook
  • Pure JavaScript: no native modules, no pod install, no Gradle changes. Works in Expo Go, in bare React Native CLI projects, and in EAS builds
  • Gzip-compressed transport via fflate (Hermes / JSC have no CompressionStream)
  • Published as @tracepath/react-native on npm, RN ≥ 0.72, React ≥ 18

Limitations

  • No screen recording. Unlike the browser SDK, this package does not record the screen. The rrweb recorder is intentionally absent, so nothing in the bundle reaches into a DOM that doesn't exist.
  • Navigation needs manual wiring. React Native has no window.history to auto-instrument and no equivalent to Android's Activity lifecycle callbacks. Wire recordNavigation(from, to) into your navigation library. The docs include a react-navigation and an Expo Router example.
  • Richer device info needs an extra package. The auto-collected attributes use only RN core APIs (Platform, Dimensions, PixelRatio, Intl). To add device.model, device.manufacturer, etc., install expo-device or react-native-device-info yourself and pass the extras via setDeviceAttributes(...).

For browser apps, use @tracepath/frontend, which has the same wire format, plus rrweb session replay. For native apps without React Native, use the Flutter SDK (with screen recording on iOS / Android / macOS) or the Android SDK.