telex-js-apm
v1.0.5
Published
**Javascript Telex APM** is a lightweight JavaScript package designed to capture and report runtime errors in your web applications. This package simplifies error monitoring by collecting error details and sending them to your specified endpoint or loggin
Downloads
403
Readme
Javascript Telex APM
Javascript Telex APM is a lightweight JavaScript package designed to capture and report runtime errors in your web applications. This package simplifies error monitoring by collecting error details and sending them to your specified endpoint or logging them locally for debugging purposes.
Features
- Capture JavaScript Errors: Automatically listen for global errors and unhandled promise rejections.
- Custom Error Reporting: Configure your own reporting endpoint.
- Contextual Information: Collect error stack traces, browser details, and timestamps.
- Lightweight: Minimal impact on performance.
Requirements
- Node.js and npm/yarn:
Installation
- To install the package in your Laravel project, follow these steps:
1. Install via npm or yarn
- Run the following command in your project root directory:
npm install telex-js-apm
# OR
yarn add telex-js-apm
- Install via importing jsdelivr CDN.
<script src="https://cdn.jsdelivr.net/npm/[email protected]/src/error-monitor.js"></script>
Usage
- Import and initialize the error monitor in your application base layout:
new ErrorMonitor({
api_url: 'your_api_url',
app_name: 'your_appname',
});
Reporting Endpoint
- If api_url is specified, the package sends a POST request with the following JSON payload:
{
"message": "Formatted error message",
"event_name": "Error type",
"username": "your_app_name",
"status": "error",
}
Deployment
To contribute or modify the package:
1. Clone the Repository
git clone https://github.com/muh-jamiu/telex-js-apm
cd telex-js-apm
2. Install Dependencies
Install dependencies using Composer:
npm install
3. Build the package
npm run build
View package on npm platform.
Visit here
Contributing
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
Issues
If you encounter any issues, please feel free to open an issue on GitHub.
License
This package is open-source software licensed under the MIT license.
Contact
For more information or support, please reach out to:
- Email: [email protected]
- GitHub: Ganiu Jamiu