|
| 1 | +# Code Error Microservice |
| 2 | + |
| 3 | +A real-time error monitoring and reporting service that integrates with Telex channels, providing prioritized error classification and automated notifications. |
| 4 | + |
| 5 | +## π― Overview |
| 6 | + |
| 7 | +This microservice monitors your codebase for errors, processes them through a message queue system, and delivers prioritized notifications to your Telex channels. It supports real-time monitoring and configurable error thresholds. |
| 8 | + |
| 9 | + |
| 10 | +### Core Components |
| 11 | + |
| 12 | +- **Error Controller**: Entry point for error processing |
| 13 | +- **Categorization Service**: Analyzes and classifies errors |
| 14 | +- **ZeroMQ Service**: Handles message queuing and distribution |
| 15 | +- **Webhook Service**: Manages Telex channel communication |
| 16 | + |
| 17 | + |
| 18 | +## π― Features |
| 19 | + |
| 20 | +- **Error Detection** |
| 21 | + - Real-time monitoring |
| 22 | + - Static code analysis (ESLint) |
| 23 | + - Stack trace processing |
| 24 | + |
| 25 | +- **Error Processing** |
| 26 | + - Automatic categorization |
| 27 | + - Priority classification |
| 28 | + - Error enrichment |
| 29 | + |
| 30 | +- **Notification System** |
| 31 | + - Real-time Telex updates |
| 32 | + - Configurable webhooks |
| 33 | + |
| 34 | +## π Getting Started |
| 35 | + |
| 36 | +### Prerequisites |
| 37 | + |
| 38 | +- Node.js 20.x |
| 39 | +- npm 9.x |
| 40 | +- ZeroMQ library |
| 41 | + |
| 42 | +### Quick Start |
| 43 | + |
| 44 | +```bash |
| 45 | +# Clone repository |
| 46 | +git clone https://github.com/telexintegrations/code-error-microservice |
| 47 | + |
| 48 | +# Install dependencies |
| 49 | +npm install |
| 50 | + |
| 51 | +# Setup environment |
| 52 | +cp .env.example .env |
| 53 | + |
| 54 | +# Start development server |
| 55 | +npm run dev |
| 56 | +``` |
| 57 | + |
| 58 | +## π·οΈ Error Classification |
| 59 | + |
| 60 | +| Severity | Description | Example | |
| 61 | +|----------|-------------|---------| |
| 62 | +| π¨ High | System critical | Service crash, DB connection failure | |
| 63 | +| π Medium | Functional issues | API timeout, validation errors | |
| 64 | +| βΉοΈ Low | Minor problems | Deprecation warnings, style issues | |
| 65 | + |
| 66 | +## π οΈ Project Structure |
| 67 | + |
| 68 | +``` |
| 69 | +src/ |
| 70 | +βββ controllers/ # Request handlers |
| 71 | +βββ services/ # Business logic |
| 72 | +βββ middlewares/ # HTTP middlewares |
| 73 | +βββ routes/ # API routes |
| 74 | +βββ utils/ # Helper functions |
| 75 | +βββ app.ts # Application entry |
| 76 | +``` |
| 77 | + |
| 78 | + |
| 79 | +## π¦ Core Dependencies |
| 80 | + |
| 81 | +| Package | Version | Purpose | |
| 82 | +|---------|---------|---------| |
| 83 | +| express | ^4.21.2 | Web framework | |
| 84 | +| zeromq | ^6.3.0 | Message queue | |
| 85 | +| axios | ^1.8.3 | HTTP client | |
| 86 | +| typescript | ^5.8.2 | Type support | |
| 87 | +| pm2 | latest | Process management | |
0 commit comments