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

pulseguard

v1.0.2

Published

A lightweight client-side SDK for integrating with the PulseGuard observability platform. Capture structured telemetry—logs, traces, user activity, and user context—using OpenTelemetry and PulseGuard’s unified collector pipeline.

Readme

PulseGuard SDK

A lightweight client-side SDK for integrating with the PulseGuard observability platform. Capture structured telemetry—logs, traces, user activity, and user context—using OpenTelemetry and PulseGuard’s unified collector pipeline.

Features

  • Automatic client-side error tracking with OpenTelemetry context
  • React runtime error capture via ErrorBoundary
  • Logged-in user & request context tracking
  • Duplicate error suppression (trace/span deduplication)
  • Framework-agnostic, lightweight, and pluggable
  • Compatible with any OpenTelemetry-compatible backend

Installation

npm install pulseguard

Usage (React)

1. Wrap Your App with TelemetryProvider

import { TelemetryProvider } from "pulseguard";

<TelemetryProvider
    projectId={currentProjectId}
    issueTrackerUrl={trackerUrl}
>
    <Layout />
    // {children}
</TelemetryProvider>

This enables error tracking, trace/span context, and pageview tracking automatically.

2. Track Page-Level Interactions (Optional)

"use client";
import { useTelemetry } from "pulseguard";

useTelemetry({
    userId: "user-123",
    pageId: "/dashboard",
});

Adds click event tracking, performance metrics (Web Vitals), and pageview logs.

Manual Setup (non-React / CLI apps)

import { initPulseguard } from "pulseguard";

initPulseguard({
    projectId: "pulseguard-prod",
    userId: "user-123",
    issueTrackerUrl: "https://tracker.example.com",
});

Manually initializes telemetry for non-React apps or environments.

React Error Boundary (Optional)

import { ErrorBoundary } from "pulseguard";

<ErrorBoundary>
    <App />
</ErrorBoundary>

Captures runtime React errors automatically.

Manually Report Errors

import { reportError } from "pulseguard";

try {
    throw new Error("Something broke");
} catch (err) {
    reportError(err, { context: "manual trigger" });
}

How It Works

  • Leverages @opentelemetry/api for span/trace context
  • Uses context to suppress duplicate errors
  • Sends errors to /api/telemetry/error
  • Enriches with user, session, and route data
  • Integrates with OpenTelemetry Collector (Tempo, Loki, Prometheus)

API Reference

<TelemetryProvider />

| Prop | Type | Required | Description | |-----------------|-----------|----------|------------------------------------| | projectId | string | Yes | Your PulseGuard project ID | | issueTrackerUrl | string | No | Link to your external issue tracker| | children | ReactNode | Yes | Your app layout or page |

useTelemetry(options)

Tracks pageviews, performance, and user interactions.

| Option | Type | Description | |-------------------|---------|--------------------------------------| | userId | string | Optional user ID | | pageId | string | Optional page route | | trackInteractions | boolean | Enable click tracking (default: true)|

initPulseguard(config)

For non-React usage.

initPulseguard({
    projectId: "pulseguard-prod",
    userId: "user-123",
    issueTrackerUrl: "https://tracker.io/..."
});

reportError(error, extra?)

Send manual error reports:

reportError(new Error("Whoops"), { component: "Header" });

<ErrorBoundary />

Wraps part of your app to auto-capture uncaught React errors.

Example Error Payload

{
    "message": "TypeError: undefined is not a function",
    "stack": "...",
    "user": {
        "id": "123",
        "email": "[email protected]"
    },
    "traceId": "e40f8b7b46...",
    "spanId": "0d4f1b...",
    "timestamp": "2025-07-20T12:34:56.123Z"
}

Security

  • Errors are sent via HTTPS
  • Sensitive fields (e.g., cookies, tokens) are not collected by default
  • User info is optional and customizable

Dependencies

| Package | Purpose | |-----------------------|----------------------------------| | @opentelemetry/api | Trace/span context + metadata |

Roadmap

  • Breadcrumbs (clicks, navigation, console logs)
  • Global custom event tracking
  • React SDK
  • Auto-capture TTFB, FID, CLS, etc.

License

MIT — Free for personal and commercial use.

Built With

  • OpenTelemetry
  • Grafana Tempo
  • Loki
  • Next.js