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

@cocreate/server-telemetry

v1.20.0

Published

High-throughput, non-blocking dual-buffered telemetry orchestrator for CoCreate Server. Measures real-time multi-tenant bandwidth, API operation tracing, and consumption analytics without event-loop lag.

Readme

CoCreate Server Telemetry

A high-frequency, non-blocking telemetry engine designed to monitor multi-tenant resource saturation, loop latency, and connection bandwidth consumption across clustered environments. This module streams real-time system performance insights directly into the CoCreate self-healing autoscaler ecosystem.


Documentation

For full API references, custom performance metrics, and dashboard ingestion guides, refer to the CoCreate Server Telemetry Documentation.


Table of Contents


Low-Overhead High-Frequency Telemetry Engine

Monitoring real-time systems often introduces an instrumentation tax—where the observer itself degrades performance. @cocreate/server-telemetry is engineered using low-level, asynchronous polling loops to monitor internal runtime state with near-zero overhead.

Event Loop Lag Detection

Instead of tracking abstract hypervisor data, this module monitors actual V8 thread starvation by measuring scheduling delay intervals. A precision timer schedules microtask check-ins; deviations reveal when application code is blocking the single thread.

Zero-Allocation Ring Buffers

To prevent triggering V8 Garbage Collection (GC) pauses during intense data collection, all raw telemetry samples are held in pre-allocated, fixed-size typed array ring buffers in memory, ensuring consistent application execution.

 [Metrics Gatherer] ──► [Pre-Allocated Ring Buffer] ──► [Asynchronous Flush] ──► [Autoscaler Engine]
                             (Zero GC Overhead)

Why CoCreate Server Telemetry?

Standard infrastructure monitoring agents (like Datadog or Prometheus Node Exporter) sample system states at coarse 10 to 60-second intervals and look at machines globally. They completely miss the short, critical spikes that degrade real-time WebSocket experiences—like a single tenant executing a complex query that triggers a 500ms event loop freeze.

@cocreate/server-telemetry isolates metrics down to the individual Organization ID and Socket Connection Instance. It calculates instant health profiles at sub-second intervals, giving the @cocreate/server-autoscaler the granular insight required to gracefully shed or migrate specific tenant workloads before users experience lag.


The Metric Profile Plane

The telemetry engine continually samples four primary dimensions across the cluster:

| Metric Group | Collection Method | Key Use Case | | --- | --- | --- | | V8 Event Loop Lag | Asynchronous Microtask Polling | Detects thread starvation caused by heavy computation or synchronous execution blockages. | | Memory Profiles | process.memoryUsage.rss() | Tracks memory growth and leaks within individual worker instances. | | Socket Density | Active Session Tracking | Measures connection volumes to protect memory limits. | | Bandwidth Deltas | Network Interface Stream Counters | Monitors tenant-isolated data rates to identify runaway processes or DDoS vectors. |


The Saturation Index Calculation

The absolute core of the CoCreate self-healing cluster is the Saturation Index ($S_i$). The telemetry module calculates this value at regular 500ms intervals using a dynamic weighted linear combination:

$$S_i = \alpha \cdot \left(\frac{\text{Loop Lag (ms)}}{\text{Max Lag Limit}}\right) + \beta \cdot \left(\frac{\text{RAM Used}}{\text{RAM Allocated}}\right) + \gamma \cdot \left(\frac{\text{Active Sockets}}{\text{Max Socket Capacity}}\right)$$

Where the weight constants are tuned by default to prioritize thread fluidity:

  • $\alpha = 0.50$ (Event Loop Fluctuations)
  • $\beta = 0.30$ (Memory Saturation)
  • $\gamma = 0.20$ (Connection Density)

When $S_i > 0.85$ for a consecutive duration exceeding 15 seconds, the telemetry plane fires a critical notification to the server orchestration layer to prompt a defensive horizontal scaling action.


Non-Blocking Multi-Threaded Streaming

Telemetry data shouldn't compete with application throughput. When configured to stream metrics to a central database or external timeseries sink, @cocreate/server-telemetry offloads data serialization work entirely.

Using Node.js worker_threads, the main application thread offloads raw data arrays to a background thread using zero-copy ArrayBuffer transfers. The background worker serializes and ships the metric payload asynchronously, leaving the primary thread free to process WebSocket packets uninterrupted.


Configuration

Drop a telemetry.config.json into your server root directory to manage monitoring frequencies and aggregation targets.

{
  "samplingIntervalMs": 500,
  "flushIntervalMs": 5000,
  "retentionPeriodHours": 24,
  "limits": {
    "maxAllowedV8LagMs": 100,
    "highMemoryThresholdPercent": 85
  },
  "streaming": {
    "enabled": true,
    "useWorkerThread": true,
    "target": "cluster-registry"
  }
}

Installation

NPM Installation

npm i @cocreate/server-telemetry

Yarn Installation

yarn add @cocreate/server-telemetry

Announcements

Performance improvements, kernel tracing updates, and profiling modifications are documented on the CoCreate Server Telemetry GitHub Releases page. Subscribe to stay informed about optimization releases and new features.


Roadmap

Upcoming capabilities for our monitoring plane include:

  • eBPF Network Inspections: Low-overhead, kernel-level packet inspection to isolate network throughput anomalies down to precise system sockets.
  • GC Execution Visualizer: Deep tracing hooks that flag exactly which tenant code block caused V8 mark-and-sweep garbage collection freezes.

How to Contribute

We welcome pull requests targeting performance profiling, adapter additions, and bug fixes. Please read our CONTRIBUTING.md guide for local development workflows.

If you encounter any bugs or wish to request new features, please submit an issue on our GitHub Issues tracker. We want this library to be community-driven, and CoCreate-led. We need your help to shape its future.

For broader system configurations and API guides, please visit our CoCreate Server Telemetry Documentation.


About

@cocreate/server-telemetry is designed, built, and supported by the CoCreate Developer Experience Team.

[!NOTE] For questions regarding telemetry pipelines, custom metric adapters, or deployment profiling, please visit our GitHub Discussions or join our Discord community.

@cocreate/server-telemetry is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.