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

@alikhan-devs/traceify

v1.0.0

Published

Intelligent request tracing middleware for Express.js with request IDs, performance insights, and structured logging

Readme

📡 Tracify


⚡ What is Tracify?

Tracify is a zero-config request tracing SDK for Express.js.

It helps you instantly understand:

  • How long each request takes
  • How much time is spent in DB operations
  • What happens inside your request lifecycle
  • Where bottlenecks are occurring

No setup. No external services. No dashboards to configure.

Just install and use.


🚀 Features

  • 📡 Automatic request tracing
  • ⏱ Total, DB, and processing time breakdown
  • 🧠 Step-by-step request timeline
  • 🖥 Built-in /trace UI dashboard
  • 💾 Persistent storage (.tracify/traces.json)
  • 🔍 Route-level performance insights
  • 🧼 Safe logging with fallback protection
  • ⚡ Works with any Express app

📦 Installation

npm install @alikhan-devs/tracify

🧠 Quick Start

const express = require("express");
const tracify = require("@alikhan-devs/tracify");

const app = express();

app.use(express.json());

// Enable tracing (1 line)
app.use(tracify());

app.get("/users", async (req, res) => {
  req.tracer.addStep("fetching users");

  const users = await getUsersFromDB();

  req.tracer.addStep("users fetched");

  res.json(users);
});

app.listen(3000, () => {
  console.log("Server running on http://localhost:3000");
  console.log("Trace UI: http://localhost:3000/trace");
});

🖥 Trace UI

Once enabled, open:

http://localhost:3000/trace

You will see:

  • All API requests
  • Execution timeline
  • DB vs processing breakdown
  • Slow request highlighting
  • Request-by-request inspection

📊 Example Trace Output

{
  "traceId": "7e556d045ed72e58",
  "method": "GET",
  "path": "/users",
  "status": 200,
  "totalTime": 18,
  "dbTime": 12,
  "processingTime": 6,
  "steps": [
    { "label": "fetching users" },
    { "label": "users fetched" }
  ],
  "timestamp": "2026-05-02T10:26:02.071Z"
}

🧪 Tracer API

Inside routes:

Add step

req.tracer.addStep("validation started");

DB timing

req.tracer.startTimer("db");

await User.find();

req.tracer.endTimer("db");

⚙️ Configuration

app.use(tracify({
  slowThreshold: 500, // ms threshold for slow request detection
}));

📁 Persistent Storage

Traces are automatically saved to:

.tracify/traces.json

This means:

  • Restart server → data still exists
  • Debug history persists
  • No external DB required

🔒 Security

Tracify is designed to be safe by default:

  • No external network calls
  • No data leaves your server
  • Sensitive logs are automatically sanitized
  • Can be disabled in production

🚫 Ignored Routes

Internal UI routes are automatically ignored:

  • /trace
  • /trace/api.json

🧠 Why Tracify?

Most observability tools require:

  • External dashboards
  • API keys
  • Setup complexity
  • Paid plans

Tracify is different:

You install it, and it just works inside your app.

Perfect for:

  • Developers
  • Startups
  • MVPs
  • Internal tools
  • Learning backend performance

🛣 Roadmap

  • [ ] Real-time WebSocket streaming UI
  • [ ] Route grouping (/users/:id)
  • [ ] Performance percentiles (p50, p95)
  • [ ] Distributed tracing support
  • [ ] OpenTelemetry export
  • [ ] Cloud dashboard (optional SaaS layer)

📄 License

MIT © Ali Khan


⭐ Support

If Tracify helped you:

  • Star the repo
  • Share it with developers
  • Use it in your projects