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

@autter/runtime-browser

v1.0.0

Published

Tiny, dependency-free browser error and usage tracker for Autter Runtime (<5 KB gzipped)

Downloads

98

Readme

@autter/runtime-browser

Tiny, dependency-free browser error + usage tracker for Autter Runtime. ~1 KB brotlied (5 KB CI budget), zero runtime dependencies, no OTel SDK, no console patching, no DOM recording, no offline storage.

Install

npm install @autter/runtime-browser

Usage

import { initAutterBrowser, captureException, trackEvent } from "@autter/runtime-browser";

initAutterBrowser({
  endpoint: "/api/autter-runtime",   // your same-origin relay — never a key in the browser
  service: "web-app",
  environment: "production",
  release: "e4a218f",                // e.g. a git SHA
});

// Unhandled errors and promise rejections are captured automatically.

// Handled errors:
try {
  await startCheckout();
} catch (error) {
  captureException(error, { operation: "start-checkout" });
  throw error;
}

// Coarse usage counters (no PII in props):
trackEvent("clicked_cta");

Two ways to deliver events:

Relay (recommended when you have a backend)endpoint points at a route on your own backend created with createBrowserRelayHandler from @autter/runtime-node. No key in the browser at all.

Direct (static sites, SPAs without a backend) — point at the ingester with a publishable client key (autter_rtc_…, scope client). Client keys only work on the browser endpoint, are origin-restricted server-side, and rate-limited harder — never ship a secret autter_rt_ server key:

initAutterBrowser({
  endpoint: "https://otlp.autter.dev/v1/browser",
  clientKey: "autter_rtc_xxxxxxxx",
  service: "marketing-site",
});

API

| Function | Notes | | --- | --- | | initAutterBrowser(options) | Installs error/unhandledrejection listeners, sends a session ping | | captureException(error, context?) | Handled errors; fast-flushed | | captureMessage(message, severity?, context?) | Warnings/info without an exception ("warning" default); grouped and aggregated like errors | | trackEvent(name, props?) | Usage counter; aggregated server-side per minute | | setUser(id) | Opaque id only — never an email | | setContext(ctx) | Attached to subsequent events | | flush() | Force-send the queue (also runs on page hide/unload) |

Batching & delivery

Events queue and flush at 10 events / 5 s / page hidden / pagehide / manually; errors trigger a fast flush (500 ms). Delivery uses navigator.sendBeacon (JSON blob) with a fetch(keepalive) fallback, so events survive page navigation. A hard cap of 200 events per session prevents error loops from flooding.

What is never sent

Full URLs with query strings, cookies, localStorage, DOM content, form values, request headers/bodies, console history, emails, IP addresses. Routes are location.pathname only; filenames are query-stripped.