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

zotrace

v0.1.2

Published

Lightweight structured log analyzer for Node.js — stream JSON logs and get real-time RPS, error rates, latency percentiles, and HTML reports.

Readme

zotrace

Lightweight structured log analytics for Node.js — stream JSON (or common text) logs from files, stdin, or process pipes and get rolling RPS, error rate, p50/p95 latency, top endpoints, and deduplicated error messages. No Elasticsearch cluster required.

Author: Akum Blaise Acha — Senior DevOps & Platform Engineer.

| Doc | Purpose | |-----|---------| | ARCHITECTURE.md | System design, parsing flow, time semantics, extension points | | CONTRIBUTING.md | Local dev, tests, PRs, release notes for contributors |

npm install -g zotrace
# or
npx zotrace analyze ./logs/app.log

Why this exists

Small and mid-sized teams often run Pino, Winston, or Morgan and still debug production by grep, jq, and intuition. zotrace sits between raw files and a full observability stack: one binary, immediate answers, works over SSH.

Commands

analyze — batch summary (JSON)

Reads a file or stdin and prints one JSON snapshot (good for scripting).

zotrace analyze ./logs/api.log
cat combined.log | zotrace analyze

watch — live terminal dashboard

Pipe Docker, PM2, kubectl, or any JSON-line producer:

docker service logs my_api --follow 2>&1 | zotrace watch --format json
pm2 logs --raw 2>&1 | zotrace watch

Flags:

| Flag | Meaning | |------|---------| | -f, --format <name> | Hint: json, pino, winston, morgan, console-json, generic-json | | --json-only | Never treat lines as Morgan/combined Apache text (recommended for Docker’s JSON driver) | | -w, --window <sec> | Rolling window length (default 60) | | --error-alert <rate> | Alert when error rate ≥ threshold in-window (default 0.15) |

report — self-contained HTML

Scans directories (**/*.log, **/*.jsonl, **/*.txt) or glob patterns, applies --since, and writes a single offline HTML file using Chart.js from a CDN (no local server).

zotrace report ./logs/ --since 24h --output report.html

--since accepts values like 30m, 24h, 7d, 3600s.

Supported shapes

| Source | Detection | |--------|-----------| | Pino | Numeric level, time, msg, optional req/res, responseTime | | Winston | level + message / msg, optional meta fields | | Morgan combined | Apache-style line with method, path, status | | Generic JSON | statusCode, durationMs, path, message, etc. |

Unknown lines are skipped; parsers are ordered to prefer the most specific match.

Programmatic API

The package exports stable types and functions for custom tooling:

import { parseLogLine, AnalyticsEngine } from "zotrace";

See src/index.ts for the full surface.

Development

npm install
npm run build    # emits dist/
npm test
npm run lint
node dist/cli/index.js analyze examples/sample.log

Demo assets (GIFs)

Record watch mode with agg, terminalizer, or a screen recorder, then embed in this README. Keep clips short (under ~15s) and use realistic JSON logs.

Docker / Swarm

With the JSON log driver, container stdout is already JSON per line — use --format json so Morgan parsing is skipped:

docker service logs -f my_stack_api 2>&1 | zotrace watch --format json

For file-based logs mounted into a sidecar or jump host, use analyze / report against the mounted volume path.

License

MIT — see LICENSE.