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

@errorgap/react-native

v0.2.0

Published

React Native notifier for Errorgap error tracking.

Readme

@errorgap/react-native

React Native notifier for Errorgap. Captures uncaught JS errors and unhandled promise rejections (V8 and Hermes stack formats) and ships notices to an Errorgap server, plus nested Error.cause chains, breadcrumbs, structured logs, and APM transactions/spans. JS-side telemetry only — pair with errorgap-swift / errorgap-android for native crashes.

Metro-served development bundles are resolved back to original TypeScript source (file, line, function, and a source excerpt) using the bundle's source map, so backtraces render app and vendor frames with highlighted source in the dashboard without any repository integration.

Install

npm install @errorgap/react-native

No native modules — no pod install or Gradle wiring needed.

Configure

Call as early as possible in the app entry point:

import { Errorgap } from "@errorgap/react-native";
import { Platform } from "react-native";

Errorgap.init({
  endpoint:    "https://errorgap.example.com",
  projectSlug: "my-app",
  apiKey:      "<project key>",
  environment: __DEV__ ? "development" : "production",
  deviceInfo: {
    os_name: Platform.OS,
    os_version: String(Platform.Version),
  },
});

init installs ErrorUtils.setGlobalHandler and an unhandled-rejection hook by default — pass captureGlobals: false to skip. deviceInfo is caller-supplied so the package ships no native code; anything you pass is attached to every notice.

Manual notification

try {
  await risky();
} catch (err) {
  await Errorgap.notify(err, { context: { component: "billing" } });
  throw err;
}

notify returns a DeliveryResult ({ status, body } on success, { error } on failure, { queued: true, status: 202 } in async mode). The SDK never throws.

Nested errors are captured automatically: pass a chain built with new Error("…", { cause }) and each cause's type/message lands in context.causes while its frames merge into the backtrace.

Breadcrumbs

Record navigation, taps, and requests; the recent trail is attached to every notice as context.breadcrumbs.

Errorgap.addBreadcrumb("navigated to Checkout", {
  category: "navigation",
  metadata: { from: "Cart" },
});

Structured logs

await Errorgap.log("payment gateway timeout", "error", { source: "payments" });

Levels are trace < debug < info < warn < error < fatal; anything below minimumLogLevel is dropped client-side.

Performance (APM)

Time a screen interaction or API call and record DB/HTTP spans:

await Errorgap.trackTransaction(
  { method: "GET", path: "/orders/{orderId}", pathRaw: "/orders/123" },
  async (spans) => {
    spans.database("SELECT * FROM orders WHERE id = 123", 4.2, { function: "OrderRepo.load" });
    spans.external(88, { function: "PaymentGateway.charge" });
    await loadOrder();
  },
);

Background work is delivered as a job transaction:

await Errorgap.trackJob("ReceiptJob", async (spans) => {
  spans.database("INSERT INTO receipts …", 6);
}, { queue: "mailers" });

trackTransaction/trackJob time the callback and deliver on completion even if it throws. Use Errorgap.notifyTransaction(...) for a pre-measured transaction.

Configuration reference

| Option | Default | Notes | |---|---|---| | endpoint | "" | Base URL, no trailing slash. Required | | projectSlug | — | Required | | projectId | — | Optional, embedded in payload | | apiKey | — | Sent as x-errorgap-project-key | | environment | production | | | release | — | App version/build for release tracking | | deviceInfo | {} | Caller-supplied device metadata | | async | true | Fire-and-forget delivery | | logger | console | Pass null to silence | | filterKeys | ["password", "token", "secret", ...] | Substring match, case-insensitive | | captureGlobals | true | Install global error hooks | | sourceMaps | true | Resolve Metro bundle frames to original source | | apmEnabled | true | Deliver APM transactions | | apmSampleRate | 1 | Fraction (0..1) of transactions delivered | | logsEnabled | true | Deliver structured logs | | minimumLogLevel | info | Drop logs below this level | | maxBreadcrumbs | 25 | Breadcrumbs retained per notice |

Graceful flush

await Errorgap.flush();

Development

npm install
npm test
npm run build

License

MIT.