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

@linklabjs/telemetry

v0.1.0

Published

Observability pipeline for LinkLab — traces, metrics, calibration

Readme

@linklabjs/telemetry

Observability pipeline for LinkLab navigation engine.

Captures execution traces, computes semantic health metrics, and feeds the calibration loop that keeps your graph weights accurate over time.


How it works

Every navigation resolved by the LinkLab engine produces a span. Those spans flow through a lightweight internal pipeline:

NavigationEngine
  → SpanBuilder       (builds structured spans)
  → TraceBus          (broadcasts to subscribers)
  → MetricsCalculator (computes Tension, Pressure, Comfort)
  → CalibrationJob    (adjusts graph weights from observed data)
  → DuckDB            (stores trace history for analysis)

No external collector required. The pipeline runs in-process and stays out of your way.


Metrics

LinkLab telemetry uses three semantic health metrics rather than raw technical counters.

Tension — gap between expected and actual latency

Tension = actual_latency / expected_latency

Tension > 1 means the system is under strain.

Pressure — load on critical resources

Pressure = (pending_upgrades + cache_misses) / capacity

Pressure approaching 1 signals saturation risk.

Comfort — composite health index

Comfort = cache_hit_rate × (1 - Tension) × (1 - Pressure)

This is the single metric to watch first. One number that tells you how the system breathes.

┌─────────────────────────────────────┐
│  LinkLab Health                     │
│                                     │
│  Comfort   ████████░░  78%  ↑       │
│  Tension   ██░░░░░░░░  0.3  ✓       │
│  Pressure  ███░░░░░░░  32%  ✓       │
│                                     │
│  Cache hit     94%                  │
│  Active paths  847                  │
└─────────────────────────────────────┘

Why DuckDB, not OpenTelemetry

OpenTelemetry standards are too rigid for the semantic richness of LinkLab traces. A Trail carries contextual meaning — entity, depth, semantic label, resolved path — that doesn't map cleanly onto OTel spans.

DuckDB gives us:

  • Native JSON querying for complex trace structures
  • Exceptional performance on baseline aggregations
  • Portable debugging — download a .duckdb file from production and replay it locally

An OTel shim is available if you need to forward traces to an existing collector. But the internal pipeline is the primary path.


Core concepts

Span — a single measurable execution unit: route, timestamp, duration, metadata.

Trace — a collection of spans representing one complete navigation.

Baseline — reference values used to evaluate metrics. Two types: LatencyBaseline, CapacityBaseline.

Calibration — adaptive process that adjusts baselines from observed data. Runs as a background job after each trace batch.


Installation

npm install @linklabjs/telemetry

Requires @linklabjs/core.


Status

@linklabjs/telemetry is stable for internal use. The DuckDB storage layer and CalibrationJob are production-ready. The real-time dashboard integration is under active development.


More



License

MIT — Charley Simon