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

bug-tracker-sdk

v1.0.9

Published

A lightweight JavaScript SDK for automatically tracking frontend errors, API failures, and console issues in your applications. The SDK works seamlessly with both Axios and Fetch APIs.

Downloads

888

Readme

BugTracker SDK

A lightweight JavaScript SDK for automatically tracking frontend errors, API failures, and console issues in your applications. The SDK works seamlessly with both Axios and Fetch APIs.

Features

  • Automatic Error Tracking - Captures JavaScript runtime errors and unhandled promise rejections
  • API Monitoring - Tracks Axios and Fetch API failures with full request/response data
  • Stack Trace Parsing - Extracts file, line, and column information from error stacks
  • Smart Fingerprinting - Groups similar errors automatically
  • Lightweight - Minimal overhead on your application

Installation

npm install bug-tracker-sdk

Quick Start

Basic Setup

import { initBugTracker } from "bug-tracker-sdk";
import axios from "axios";

initBugTracker({
  apiKey: "your-api-key",
  axios
});

// That's it! Your app is now tracking errors.

🔑 How to Generate an API Key

To start using , you first need to generate a project API key from the dashboard.

Step 1: Open the Dashboard

Go to the dashboard and Login:

👉 bugtrace.jainprashuk.in

Step 2: Create a Project

  1. Click the "Create Project" button.
  2. Enter your Project Name.
  3. Click Create Project.

Step 3: Copy Your API Key

After creating the project:

  • An API Key will be automatically generated.
  • Copy the API key from the dashboard.

For React Applications

import React from 'react';
import { initBugTracker } from 'bug-tracker-sdk';
import axios from 'axios';

// Initialize early in your application
initBugTracker({
  project: 'my-react-app',
  collectorUrl: 'http://127.0.0.1:8000',
  axios
});

function App() {
  return <div>Your app here</div>;
}

export default App;

What It Captures

1. JavaScript Errors & Crashes

Automatically catches uncaught exceptions:

// This error is automatically reported
const user = null;
console.log(user.name); // TypeError: Cannot read property 'name' of null

2. Unhandled Promise Rejections

// This rejection is automatically tracked
fetch('/api/data').catch(error => {
  throw error; // Unhandled rejection caught
});

3. Axios API Failures

// Failed requests are automatically tracked
const response = await axios.get('/api/users');
// 4xx and 5xx responses are reported

4. Fetch API Failures

// Fetch errors and non-200 responses are tracked
const response = await fetch('/api/data');
if (!response.ok) {
  // Non-200 responses are reported
}

Example with All Options

import { initBugTracker } from "bug-tracker-sdk";
import axios from "axios";

initBugTracker({
  apiKey: "sk_live_xxxxx",
  axios,
});

Integration with BugTracker Dashboard

Once errors are reported to your BugTracker collector, they appear in the dashboard at:

  • View all errors - See every error across your application
  • Group by type - Similar errors are automatically grouped
  • Track occurrences - See how many times an error has happened
  • Full stack traces - Click into errors to see complete details
  • Timeline - View first seen and last seen timestamps

Best Practices

1. Initialize Early

Initialize the SDK as early as possible in your application, preferably before any other code:

// app.js or main.tsx
import { initBugTracker } from 'bug-tracker-sdk';
import axios from 'axios';

initBugTracker({
  project: 'my-app',
  collectorUrl: 'http://127.0.0.1:8000',
  axios
});

// Rest of your app initialization...