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

observio

v2.0.2

Published

A developer-focused monitoring package for Express apps with real-time performance insights, slow API tracking, and clean dashboard UI.

Downloads

4

Readme

Apex Monitoring v2.0

A developer-focused monitoring package for Express.js applications with real-time performance insights, slow API tracking, and a clean dashboard UI.

Features

🚀 Developer-Focused Metrics

  • Top 5 Slowest APIs with max response times
  • Error Rate Tracking with real-time updates
  • Average Response Time monitoring
  • CPU & Memory Usage with trend indicators
  • Request Rate visualization
  • Status Code Distribution

📊 Real-Time Dashboard

  • Clean, modern UI optimized for backend developers
  • Dark/Light theme support
  • Responsive design for all screen sizes
  • Live data updates every 2 seconds
  • Interactive charts powered by ApexCharts

🔧 Easy Integration

  • Zero-configuration setup
  • Minimal performance overhead
  • Prometheus metrics export
  • Customizable monitoring path

Installation

npm install observa

Quick Start

const express = require("express");
const apexMonitoring = require("observa");

const app = express();

// Your Express routes
app.get("/", (req, res) => {
  res.json({ message: "Hello World!" });
});

// Initialize monitoring
const monitor = apexMonitoring(app, {
  path: "/monitor", // Dashboard path (default: '/monitor')
  silent: false, // Disable console logs (default: false)
  updateInterval: 2000, // Update interval in ms (default: 2000)
  maxSlowApis: 10, // Number of slow APIs to track (default: 10)
});

app.listen(3000, () => {
  console.log("Server running on http://localhost:3000");
  console.log("Monitor dashboard: http://localhost:3000/monitor");
});

Configuration Options

| Option | Type | Default | Description | | ---------------- | ------- | ---------- | -------------------------------------------- | | path | string | /monitor | Base route path for the monitoring dashboard | | silent | boolean | false | Disable console logs | | updateInterval | number | 2000 | Metrics update interval in milliseconds | | maxSlowApis | number | 10 | Maximum number of slow APIs to track |

API Reference

Monitor Instance Methods

const monitor = apexMonitoring(app, options);

// Get current metrics
const metrics = monitor.getMetrics();

// Get slow APIs data
const slowApis = monitor.getSlowApis();

// Update system metrics manually
monitor.updateSystemMetrics();

// Reset all metrics
monitor.resetMetrics();

API Endpoints

  • Dashboard: GET /monitor - Main monitoring dashboard
  • Metrics API: GET /monitor/api/stats - JSON API for metrics data
  • Prometheus: GET /monitor/metrics - Prometheus metrics export

Dashboard Features

Key Metrics Cards

  • CPU Usage: Real-time CPU utilization with trend indicators
  • Memory Usage: RSS memory consumption with change tracking
  • Error Rate: Percentage of failed requests (4xx/5xx)
  • Avg Response Time: Average response time across all endpoints

Slow APIs Section

  • Top 5 Slowest APIs ranked by average response time
  • Method badges (GET, POST, PUT, DELETE, PATCH)
  • Max response time for each endpoint
  • Request count and error rate per API

Performance Charts

  • System Resources: CPU and Memory usage over time
  • Request Rate: Requests per second visualization
  • Status Codes: Distribution of HTTP status codes

System Information

  • Uptime: Server uptime in human-readable format
  • Total Requests: Cumulative request count
  • Active Connections: Current active connections
  • Node.js Version: Runtime version information
  • Platform: Operating system details
  • CPU Cores: Number of CPU cores

Example Usage

const express = require("express");
const apexMonitoring = require("observa");

const app = express();

// Add some test routes
app.get("/api/users", (req, res) => {
  setTimeout(() => {
    res.json({ users: ["John", "Jane"] });
  }, Math.random() * 100);
});

app.get("/api/slow", (req, res) => {
  setTimeout(() => {
    res.json({ message: "Slow endpoint" });
  }, Math.random() * 2000 + 500);
});

app.get("/api/error", (req, res) => {
  res.status(500).json({ error: "Server error" });
});

// Initialize monitoring
const monitor = apexMonitoring(app, {
  path: "/monitor",
  maxSlowApis: 5,
});

app.listen(3000);

Performance Impact

  • Minimal overhead: < 1ms per request
  • Memory efficient: Configurable data retention
  • Non-blocking: All operations are asynchronous
  • Production ready: Tested with high-traffic applications

Browser Support

  • Chrome 60+
  • Firefox 55+
  • Safari 12+
  • Edge 79+

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE file for details.

Changelog

v2.0.0

  • Complete UI redesign focused on backend developers
  • Added top 5 slowest APIs tracking with max response times
  • Enhanced metrics: error rate, average response time
  • Improved performance with better data structures
  • Added dark/light theme support
  • Responsive design for mobile devices
  • Better chart visualizations with ApexCharts

v1.0.0

  • Initial release with basic monitoring features
  • CPU, memory, and request tracking
  • Basic dashboard UI