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

@tailcove/react-native

v0.2.0

Published

React Native client for Tailcove: logs and JavaScript errors from iOS and Android apps, batched, retried and kept across restarts.

Readme

Install

npm install @tailcove/react-native @react-native-async-storage/async-storage

Plain JavaScript, no native module: it works in Expo (managed and bare) and in bare React Native 0.70 and later. AsyncStorage is optional; with it, logs written offline or just before a crash are sent on the next launch.

Quick start

1. Get an app key. In your Tailcove dashboard, open your source's Settings tab, generate a key under Mobile apps, and add your app's iOS bundle id or Android package name (for example com.acme.shop, or com.acme.* for all of them).

The app key ships inside your app, so it is public by design. It only works for the app ids you allowed, and it has its own rate limit, so a copied key cannot use up your source's quota. It is not the server-side ingest token, which must stay secret.

2. Start the client once, as early as possible (for example in index.js or your root layout):

import AsyncStorage from '@react-native-async-storage/async-storage';
import { Tailcove } from '@tailcove/react-native';

export const tailcove = Tailcove.init({
    appKey: 'tca_your_app_key',
    appId: 'com.acme.shop',
    release: '2.4.0',
    environment: 'production',
    storage: AsyncStorage,
});

3. Log.

tailcove.info('Checkout opened', { items: 3 });
tailcove.warning('Slow image load', { ms: 2400 });
tailcove.error('Payment failed', { provider: 'stripe' });

Anywhere else in the app, Tailcove.instance is the same client.

Errors and crashes

Uncaught JavaScript errors (the red screen in development, a crash in release builds) and promise rejections nothing handled are reported on their own, as error lines, or critical when the error is fatal. Each carries the exception (class, message, location, stack) and the last 20 log calls before it, and Tailcove groups them into issues. A fatal error is saved and sent before the app goes down, and if the app dies first, it is sent on the next launch.

Report an error you caught yourself:

try {
    await placeOrder();
} catch (error) {
    tailcove.captureException(error, { orderId });
}

Add a step to the trail without sending a line: tailcove.addBreadcrumb('Tapped pay').

Promise rejections are tracked through Hermes, React Native's default engine. On JavaScriptCore, report them in your own .catch().

Native crashes (in Swift, Objective-C, Kotlin or Java code) are outside JavaScript. For those, add a Sentry SDK and point it at the DSN from your source's Error tracking section.

Users and context

tailcove.setUser(user.id);           // only the id is sent, never a name or email
tailcove.setContext({ plan: 'pro' }); // on every following line
tailcove.setUser(null);              // on sign-out

What gets added automatically

  • app.id and app.version: your app id and release
  • os.name and os.version: ios or android and the OS version
  • device: the model, brand and manufacturer on Android, phone or pad on iOS
  • environment: when you set it
  • session_id: a random id for this launch, so one session's lines are easy to find together
  • host: ios or android

Secrets stay on the phone

Before a line is queued, the client masks anything that looks like a secret, so it never leaves the device. This covers your own log calls and the errors it reports by itself.

  • In the context, the value of a key like password, api_key, client_secret, Authorization, Set-Cookie or cookies becomes [redacted], nested objects included. null and true/false stay, so has_password: true still reads fine.
  • In the message and in every string in the context, the value after such a name becomes [redacted]: token=abc123, "password": "hunter2", Authorization: Bearer .... Prose like password: too short is left alone.
  • Credentials we can spot by their shape become [key]: JWTs, AWS access key ids, Stripe secret and webhook keys, GitHub and Slack tokens, Google API keys and PRIVATE KEY blocks. Public keys and Stripe pk_ keys stay.

The client's own fields (session_id, app, os, device) aren't touched. Tailcove can mask on the server as well, but masking here means the secret never crosses the network.

Add your own key names with secretKeys, or turn masking off with maskSecrets: false. For anything else, beforeSend sees each line after masking and can change it or drop it:

Tailcove.init({
    appKey: 'tca_your_app_key',
    appId: 'com.acme.shop',
    secretKeys: ['customer_ssn'],
    beforeSend: (line) => {
        if (line.message.startsWith('Health check')) {
            return null; // dropped
        }

        delete line.context.email;

        return line;
    },
});

If beforeSend throws, the line is still sent, masked as it was, and the error goes to onError.

Options

  • appKey (required): the source's app key.
  • appId (required): the app's bundle id or package name, as allowed in Settings.
  • endpoint: defaults to https://ingest.tailcove.dev/api/v1/app/logs. Change it only if you self-host.
  • storage: an AsyncStorage-like object (getItem, setItem, removeItem). Keeps unsent lines across restarts.
  • release, environment: added to every line.
  • context: fields added to every line. Per-call context wins when keys clash.
  • batchSize: send once this many lines are waiting. Default 50.
  • flushIntervalMs: send this long after the first waiting line. Default 5000.
  • maxQueueSize: lines kept while offline; past it the oldest go first. Default 1000.
  • timeoutMs: how long one delivery attempt may take. Default 10000.
  • captureErrors, captureRejections: report uncaught errors and unhandled rejections. Default true.
  • traceLimit: stack frames kept per error. Default 20.
  • enabled: set false to turn the client off, for example in tests.
  • maskSecrets: mask secrets before a line is queued (see above). Default true.
  • secretKeys: more key names to treat as secret, matched whole, ignoring case, -, _, . and spaces.
  • beforeSend: called with each line after masking. Return the line, changed or not, or null to drop it.
  • onError: called when a batch cannot be sent or is refused, or when beforeSend throws. Failures are otherwise silent.

How delivery works

Lines wait in a queue and go out in batches, when batchSize is reached, flushIntervalMs after the first one, or when the app goes to the background. A line leaves the queue only once Tailcove has accepted it. If the phone is offline or the server asks it to slow down, the batch stays queued and is tried again with backoff (honouring Retry-After). A batch refused for good, for example after the key was revoked, is dropped and reported to onError. The client never throws into your app.

Call await tailcove.flush() to send now, and await tailcove.close() to send, save and detach the error hooks.

Help and feedback