error-monitor-tool
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Error Monitor Tool

A comprehensive error monitoring tool for web applications that automatically captures and reports errors in real-time.

Features

  • Real-time error detection and reporting
  • Automatic stack trace collection
  • Network error monitoring
  • Console error capturing
  • Error rate limiting
  • Intelligent error insights and suggestions
  • Easy integration with any web application

Installation

npm install error-monitor-tool

Usage

import { ErrorMonitor } from 'error-monitor-tool';

const errorMonitor = new ErrorMonitor({
  apiKey: 'your-api-key',
  endpoint: 'https://your-error-reporting-endpoint.com/api/errors',
  environment: 'production',
  captureConsoleErrors: true,
  captureUnhandledRejections: true,
  captureNetworkErrors: true,
  maxErrorsPerMinute: 100
});

Configuration Options

Option Type Default Description
apiKey string - Your API key for authentication
endpoint string - The endpoint where errors will be sent
environment 'development' | 'staging' | 'production' - The environment where the code is running
captureConsoleErrors boolean true Whether to capture console errors
captureUnhandledRejections boolean true Whether to capture unhandled promise rejections
captureNetworkErrors boolean true Whether to capture network errors
maxErrorsPerMinute number 100 Maximum number of errors to process per minute

Error Data Structure

Each error report includes:

  • Error message
  • Stack trace
  • Error type
  • Timestamp
  • URL where the error occurred
  • User agent information
  • Additional metadata

Error Insights

The tool provides intelligent insights for common error types, including:

  • Suggested fixes
  • Severity levels
  • Documentation links

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Package Sidebar

Install

npm i error-monitor-tool

Weekly Downloads

19

Version

1.0.4

License

MIT

Unpacked Size

55 kB

Total Files

15

Last publish

Collaborators

  • vinit07