npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@smarthivelabs-devs/observe-expo

v26.3.0

Published

SmartObserve SDK for Expo and React Native

Readme

@smarthivelabs-devs/observe-expo

Crashes, sessions, and traces for Expo and React Native. Failed ingest never throws. Events persist offline and flush when the network returns.

Use a public DSN (pk_) from SmartObserve project settings.

https://<pk_public_key>@observe.smarthivelabs.dev/<project-slug>

Native traffic uses origin smartobserve-expo://native — you do not add that in project settings. If the same app also runs in a browser, allow that HTTPS origin separately (or use @smarthivelabs-devs/observe-web on web).

Install

npx expo install @smarthivelabs-devs/observe-expo expo-application expo-constants expo-device @react-native-async-storage/async-storage @react-native-community/netinfo

npx expo install picks the versions of the native modules that match your Expo SDK. They are peer dependencies, so the app owns them (no duplicate native modules, no version clashes with the rest of your app).

Supported versions

| | Supported | | --- | --- | | Expo SDK | 52 – 58 (tested on 52 and 58 on every change) | | React Native | 0.76+ (New Architecture and legacy) | | React | 18.3+ and 19 | | Builds | Expo Go, development builds, eas build, expo prebuild, EAS Update / expo export |

Every change to this package is checked by building throwaway apps on the oldest and newest SDK: install with strict peer dependencies, typecheck, resolve the config plugin, expo prebuild, and a Metro + Hermes expo export for Android and iOS. Run it yourself with pnpm compat:check.

Start

Call init once at the root of the app.

import { SmartObserve } from "@smarthivelabs-devs/observe-expo";

SmartObserve.init({ dsn: process.env.EXPO_PUBLIC_SMARTOBSERVE_DSN });

Release and dist default to the native app version and build number. The global JS handler, AppState lifecycle, a session (active / exited / crashed), device/app context, and fetch are wired automatically.

What you send

SmartObserve.captureException(err);
SmartObserve.captureMessage("paywall shown", "info");
SmartObserve.log.warn("slow sync", { table: "orders" });

SmartObserve.setUser({ id: user.id });
SmartObserve.setTag("workspace", workspace.slug);
SmartObserve.trackScreen("Checkout", { step: "pay" });

await SmartObserve.startSpan({ name: "sync", operation: "db" }, async (span) => {
  span.setAttribute("rows", count);
  return sync();
});

trackScreen is a navigation breadcrumb. beforeSend can drop or edit events. Tokens and passwords are redacted; add keys with redactKeys. Email / IP stay off the user unless sendDefaultPii: true.

Disable automations with trackNetwork: false or trackLifecycle: false. Outgoing fetch never gets traceparent unless you allow hosts you own:

SmartObserve.init({
  dsn: process.env.EXPO_PUBLIC_SMARTOBSERVE_DSN,
  allowTracePropagationTargets: ["https://api.yourapp.com", /^https:\/\/.*\.yourapp\.com$/],
});

React Native UI

import { SmartObserveErrorBoundary } from "@smarthivelabs-devs/observe-expo/react";

<SmartObserveErrorBoundary fallback={<Text>Something broke.</Text>}>
  <App />
</SmartObserveErrorBoundary>

Config plugin

Writes dsn, environment and release into expo.extra.smartObserve; SmartObserve.init() reads them, so you can call init() without options. Source maps are not uploaded by the plugin (prebuild runs before the bundle exists): upload them after eas update / expo export with the CLI below.

{
  "expo": {
    "plugins": ["@smarthivelabs-devs/observe-expo"]
  }
}
["@smarthivelabs-devs/observe-expo", { dsn: process.env.EXPO_PUBLIC_SMARTOBSERVE_DSN }]

Upload source maps

npx expo export --source-maps
npx smartobserve-expo upload-sourcemaps --path dist --release <version> --dist <build>

--release defaults to the app.json version and --dist to the iOS buildNumber / Android versionCode, matching what the SDK sends. In CI set SMARTOBSERVE_AUTH_TOKEN to a release token from project settings (SMARTOBSERVE_RELEASE_TOKEN also works).

Options

| Option | Default | Notes | | --- | --- | --- | | dsn | — | Public key DSN | | environment | production | Shown on issues | | release / dist | native version / build | Override for EAS | | enabled | true if DSN is set | Set false in tests | | errorSampleRate | 1 | 0–1 | | tracesSampleRate | 0.1 | Root transactions | | sendDefaultPii | false | Include email / IP | | debug | false | Logs transport failures |

API

SmartObserve.init · captureException · captureMessage · log · setUser · setTag · setContext · addBreadcrumb · trackScreen · startSpan · beforeSend · flush · close · SmartObserveExpoClient