A comprehensive error monitoring tool for web applications that automatically captures and reports errors in real-time.
- 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
npm install error-monitor-tool
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
});
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 |
Each error report includes:
- Error message
- Stack trace
- Error type
- Timestamp
- URL where the error occurred
- User agent information
- Additional metadata
The tool provides intelligent insights for common error types, including:
- Suggested fixes
- Severity levels
- Documentation links
Contributions are welcome! Please feel free to submit a Pull Request.
MIT