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

infrastructure-monitor

v0.1.1

Published

Infrastructure-Monitor is a lightweight runtime monitoring library for web applications. It tracks client-side console output, failed network requests, and key performance metrics, then sends this data to a centralized monitoring endpoint. Ideal for detec

Readme

Infrastructure Monitor

npm version License: BSL

Eine leichte Laufzeit-Überwachungsbibliothek für Webanwendungen. Infrastructure Monitor verfolgt clientseitige Konsolenausgaben, fehlgeschlagene Netzwerkanfragen und wichtige Leistungsmetriken und sendet diese Daten an einen zentralisierten Überwachungsendpunkt.

Features

  • 🔍 Echtzeit-Überwachung: Verfolgt Konsolenausgaben, Fehler und Warnungen
  • 🌐 Netzwerk-Monitoring: Erkennt fehlgeschlagene API-Anfragen
  • 📊 Leistungsmetriken: Sammelt wichtige Performance-Daten
  • 📡 Zentrale Datensammlung: Sendet alle Daten an einen konfigurierbaren Endpunkt
  • 🔒 Sicher: Keine sensiblen Daten werden gesammelt
  • 🚀 Leichtgewichtig: Minimale Auswirkungen auf die Anwendungsleistung

Installation

npm install infrastructure-monitor

Verwendung

import { InfrastructureMonitor } from "infrastructure-monitor";

// Initialisierung
const monitor = new InfrastructureMonitor({
  endpoint: "https://your-monitoring-endpoint.com/api",
  applicationId: "your-app-id",
  // Optionale Konfiguration
  samplingRate: 0.1, // 10% der Ereignisse werden gesammelt
  maxBatchSize: 100, // Maximale Anzahl von Ereignissen pro Batch
  flushInterval: 5000, // Daten werden alle 5 Sekunden gesendet
});

// Starten der Überwachung
monitor.start();

// Beenden der Überwachung
monitor.stop();

Konfiguration

| Option | Typ | Standard | Beschreibung | | ------------- | ------ | -------- | ----------------------------------------------- | | endpoint | string | - | URL des Überwachungsendpunkts (erforderlich) | | applicationId | string | - | Eindeutige ID der Anwendung (erforderlich) | | samplingRate | number | 1.0 | Rate der zu sammelnden Ereignisse (0.0 - 1.0) | | maxBatchSize | number | 100 | Maximale Anzahl von Ereignissen pro Batch | | flushInterval | number | 5000 | Intervall in Millisekunden zum Senden der Daten |

Test-Server

Für Entwicklungs- und Testzwecke enthält dieses Paket einen einfachen Express-Server, der die Monitoring-Daten empfängt und lokal speichert.

Server starten

# Entwicklungsmodus mit automatischem Neuladen
npm run dev:server

# Oder: Build und Start im Produktionsmodus
npm run build:server
npm run start:server

Der Server läuft standardmäßig auf Port 3000 und bietet folgende Endpunkte:

  • POST http://localhost:3000/api/monitoring - Empfängt Monitoring-Daten
  • GET http://localhost:3000/api/status - Server-Status-Check

Gespeicherte Daten

Die empfangenen Daten werden im data-Verzeichnis als JSON-Dateien gespeichert. Der Dateiname enthält die Application-ID und den Zeitstempel.

Beispiel einer gespeicherten Datei:

{
  "timestamp": "2024-03-02T15:30:00.000Z",
  "events": [
    {
      "type": "console",
      "level": "error",
      "message": "API-Aufruf fehlgeschlagen",
      "timestamp": "2024-03-02T15:29:59.000Z"
    }
  ]
}

Datenschutz

Infrastructure Monitor sammelt nur technische Daten, die für die Überwachung und Fehlerbehebung notwendig sind. Es werden keine personenbezogenen Daten oder sensible Informationen gesammelt.

Lizenz

Dieses Projekt ist unter der BSL (Business Source License) lizenziert. Weitere Informationen finden Sie in der LICENSE-Datei.

Beitragen

Beiträge sind willkommen! Bitte lesen Sie unsere Beitragsrichtlinien für Details.

Support

Bei Fragen oder Problemen öffnen Sie bitte ein Issue auf GitHub.

Autoren

  • Steffen Bahrmann

Danksagung

Danke an alle Mitwirkenden, die zu diesem Projekt beigetragen haben.