JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q43320F
  • License MIT

Lightweight monitoring SDK for Matowatch - send heartbeats, logs, errors, metrics, and system profiling from your Node.js app

Package Exports

  • matowatch
  • matowatch/dist/index.js
  • matowatch/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (matowatch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

matowatch

Lightweight monitoring SDK for Matowatch - zero-config observability for your Node.js applications.

Install

npm install matowatch

Quick Start

const Matowatch = require('matowatch');

Matowatch.init({
  apiKey: 'pm_your_api_key_here',
});

That's it. Matowatch will automatically:

  • Send heartbeat pings every 30s
  • Capture uncaught exceptions and unhandled rejections
  • Buffer and flush logs efficiently

Logging

Matowatch.info('User signed up', { source: 'auth-service' });
Matowatch.warn('Slow query detected', { metadata: { queryTime: 500 } });
Matowatch.error('Payment failed', { source: 'billing' });

Error Capture

try {
  await riskyOperation();
} catch (err) {
  Matowatch.captureError(err, { source: 'payment-service' });
}

Custom Metrics

await Matowatch.metric('response_time', 145, { unit: 'ms', tags: { route: '/api/users' } });
await Matowatch.metric('queue_size', 42, { tags: { queue: 'emails' } });

Configuration

Matowatch.init({
  apiKey: 'pm_your_api_key',
  endpoint: 'https://matowatch.replit.app',
  environment: 'production',
  heartbeatInterval: 30000,
  captureErrors: true,
  debug: false,
});

Shutdown

Matowatch.shutdown();

License

MIT