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

uptimemesh-rn

v1.2.2

Published

UptimeMesh React Native SDK — crash, performance and network monitoring

Readme

uptimemesh-rn

npm version license

React Native SDK for UptimeMesh — automatic crash reporting, network request monitoring, screen tracking and session analytics.

Features

  • Automatic crash reporting — unhandled JS errors and fatal exceptions
  • Network monitoring — all fetch requests tracked automatically
  • Session tracking — device info, OS version, app version, network type
  • User identification — associate sessions with your users via identify()
  • Screen tracking — manual or via React Navigation
  • Custom events — track any user action with properties
  • Offline buffer — events saved locally when offline, sent when connection returns
  • Batch sending — efficient batching, no per-event requests
  • TypeScript — full type definitions included

Installation

npm install uptimemesh-rn
# or
yarn add uptimemesh-rn

Optional: Offline buffer support

Install AsyncStorage to persist events when the app is offline:

npm install @react-native-async-storage/async-storage
npx pod-install   # iOS only

If not installed, events are kept in memory only (lost on app kill while offline).

Quick Start

// App.js or App.tsx
import UptimeMesh from 'uptimemesh-rn';

UptimeMesh.init('YOUR_API_KEY');

Get your API key from the UptimeMesh dashboard → Mobil Uygulamalar → [App] → Entegrasyon.


API Reference

UptimeMesh.init(apiKey, options?)

Initialize the SDK. Call this once, as early as possible in your app entry point.

UptimeMesh.init('YOUR_API_KEY', {
  debug: true,           // print SDK logs to console
  flushInterval: 30000,  // send events every 30 seconds (ms)
  maxQueueSize: 50,      // auto-flush when 50 events are queued
  // AdBlocker bypass: kendi proxy'nizi kullanmak için:
  // ingestUrl: 'https://yourdomain.com/um-proxy',
});

| Option | Type | Default | Description | |--------|------|---------|-------------| | ingestUrl | string | https://ingest.uptimemesh.com | Ingest endpoint (AdBlocker bypass için override) | | flushInterval | number | 30000 | Interval in ms between automatic flushes | | maxQueueSize | number | 50 | Queue size that triggers an immediate flush | | debug | boolean | false | Log SDK activity to console | | apiUrl | string | — | DeprecatedingestUrl kullanın |


UptimeMesh.identify(userId)

Associate the current session (and all future sessions) with a user.
Call this after login and pass null after logout.

// After successful login
const user = await authService.login(email, password);
UptimeMesh.identify(user.id);          // or user.email, username, etc.

// After logout
await authService.logout();
UptimeMesh.identify(null);

Once set, the user ID appears in the UptimeMesh dashboard → Mobil Uygulamalar → [App] → Oturumlar table under the Kullanıcı column.

Note: Sessions recorded before identify() is called will show in the dashboard. The user ID is attached to the session from the moment identify() is called.


UptimeMesh.trackScreen(name)

Track a screen view.

UptimeMesh.trackScreen('HomeScreen');
UptimeMesh.trackScreen('ProductDetail');

With React Navigation — add a listener to NavigationContainer:

import { useNavigationContainerRef } from '@react-navigation/native';

const navigationRef = useNavigationContainerRef();

<NavigationContainer
  ref={navigationRef}
  onStateChange={() => {
    const route = navigationRef.getCurrentRoute();
    if (route) UptimeMesh.trackScreen(route.name);
  }}
>
  {/* ... */}
</NavigationContainer>

UptimeMesh.trackClick(elementName, screen?)

Buton veya element tıklamalarını loglar. trackEvent('click', ...) için kısayol.

UptimeMesh.trackClick('checkout_button', 'CartScreen');
UptimeMesh.trackClick('menu_item_profile');

Dashboard'da Events → click event'i olarak görünür. element ve screen alanları filtrelenebilir.


UptimeMesh.trackEvent(name, properties?)

Track a custom event with optional metadata.

UptimeMesh.trackEvent('purchase_completed', { amount: 99.90, currency: 'TRY' });
UptimeMesh.trackEvent('video_played', { videoId: 'abc123', duration: 120 });

İpucu: Dashboard'daki Events → Arama panelinden event_name=purchase_completed, amount__gt:50 gibi filtreler uygulayabilirsiniz.


UptimeMesh.captureError(error)

Manually report a caught error.

try {
  await loadUserData();
} catch (error) {
  UptimeMesh.captureError(error);
}

UptimeMesh.flush()

Immediately send all queued events. Useful before app close or logout.

await UptimeMesh.flush();

UptimeMesh.shutdown()

Stop the SDK, flush remaining events, and remove all interceptors.

UptimeMesh.shutdown();

What's Collected Automatically

| Data | Source | Can Disable | |------|--------|-------------| | Unhandled JS crashes | ErrorUtils.setGlobalHandler | No (core feature) | | Network requests (URL, method, status, duration) | global.fetch intercept | — | | Session start/end | AppState listener | — | | Device model | Platform.constants | — | | OS name & version | Platform.OS, Platform.Version | — | | App version | Passed via deviceInfo | — |

Privacy: Query strings are stripped from all URLs before sending.
Example: https://api.example.com/users?token=abchttps://api.example.com/users


Event Types

| Type | Description | Triggered By | |------|-------------|--------------| | crash | Unhandled fatal error | ErrorUtils | | error | Caught / non-fatal error | captureError() | | screen | Screen view | trackScreen() | | event | Custom user action | trackEvent() | | network | HTTP request | fetch interceptor |


Offline Mode

When the device has no internet connection:

  • Events are saved to AsyncStorage (if installed)
  • On next app launch or reconnect, saved events are sent automatically
  • Without AsyncStorage: events stay in memory until the app is killed

TypeScript Usage

import UptimeMesh, { UptimeMeshOptions } from 'uptimemesh-rn';

const options: UptimeMeshOptions = {
  debug: __DEV__,
  flushInterval: 15_000,
};

UptimeMesh.init('YOUR_API_KEY', options);

Expo Support

Works with both Expo managed and bare workflow.

For Expo managed, AsyncStorage requires a custom dev client or bare workflow:

npx expo install @react-native-async-storage/async-storage

Troubleshooting

Events not appearing in the dashboard?

  1. Enable debug: true and check console for [UptimeMesh] logs
  2. Verify your API key in UptimeMesh dashboard → Entegrasyon
  3. Call await UptimeMesh.flush() and check for network errors

Crash handler not working in production?

  • Make sure init() is called before any other code in App.js
  • In Expo: init() inside registerRootComponent callback

Network requests not tracked?

  • The SDK intercepts global.fetch. If you use axios, it uses fetch internally and will be tracked automatically.
  • XMLHttpRequest is not intercepted (fetch-only)

Changelog

1.2.2

  • README güncellendi: trackClick, ingestUrl, AdBlocker bypass dokümantasyonu eklendi

1.2.1

  • UptimeMesh.trackClick(elementName, screen?) — click event kısayolu
  • UptimeMeshOptions.ingestUrl — AdBlocker bypass için özel endpoint
  • Varsayılan endpoint ingest.uptimemesh.com olarak değiştirildi
  • apiUrl deprecated edildi

1.2.0

  • identify(userId) — associate a user with the current and future sessions
  • user_id field added to SessionData

1.1.0

  • locale and timezone fields in session data
  • trackScreen(name, durationMs?) — optional transition time

1.0.0

  • Initial release
  • Crash reporting, network monitoring, session tracking
  • React Navigation integration
  • Offline buffer via AsyncStorage
  • TypeScript support

License

MIT © UptimeMesh