{"id":24955017,"url":"https://github.com/devsrijit/error-lens","last_synced_at":"2025-03-28T20:14:11.201Z","repository":{"id":274359224,"uuid":"922667482","full_name":"DevSrijit/error-lens","owner":"DevSrijit","description":"An advanced error logger with AI-powered insights and email notifications.","archived":false,"fork":false,"pushed_at":"2025-01-26T20:08:44.000Z","size":5161,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T05:28:22.788Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevSrijit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-26T19:51:11.000Z","updated_at":"2025-01-26T20:08:47.000Z","dependencies_parsed_at":"2025-01-26T20:42:00.638Z","dependency_job_id":null,"html_url":"https://github.com/DevSrijit/error-lens","commit_stats":null,"previous_names":["devsrijit/error-lens"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevSrijit%2Ferror-lens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevSrijit%2Ferror-lens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevSrijit%2Ferror-lens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevSrijit%2Ferror-lens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevSrijit","download_url":"https://codeload.github.com/DevSrijit/error-lens/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093185,"owners_count":20722402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-03T05:23:47.096Z","updated_at":"2025-03-28T20:14:11.180Z","avatar_url":"https://github.com/DevSrijit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Error Lens: Enterprise-Grade Error Intelligence Platform\n\nError Lens is an advanced error observability and analysis platform that leverages state-of-the-art AI models to provide real-time insights into application errors. By combining sophisticated error tracking with AI-powered analysis, it enables development teams to identify, understand, and resolve issues efficiently in both development and production environments.\n\n## Core Capabilities\n\n- **AI-Powered Analysis Engine**\n  - Dual AI provider support (OpenAI GPT-4 / Google Gemini-Pro)\n  - Contextual error pattern recognition\n  - Intelligent root cause analysis\n  - Code context evaluation using semantic embeddings\n\n- **Advanced Error Telemetry**\n  - Real-time error capture and categorization\n  - Structured error classification system\n  - Comprehensive stack trace analysis\n  - Context-aware error grouping\n\n- **Enterprise Notification System**\n  - Configurable email notification pipeline\n  - Severity-based alert routing\n  - Rich error context in notifications\n  - Customizable notification templates\n\n- **Developer Experience**\n  - Rich console output with advanced formatting\n  - Intuitive error boundary patterns\n  - Flexible integration options\n  - Minimal configuration overhead\n\n## Installation\n\n```bash\nnpm install error-lens\n```\n\n## Integration Guide\n\n### 1. Platform Configuration\n\nInitialize the Error Lens platform with your environment-specific configuration:\n\n```javascript\nimport { initializeConfig } from 'error-lens';\n\ninitializeConfig({\n  // AI Provider Configuration\n  openaiApiKey: process.env.OPENAI_API_KEY,      // Required for OpenAI integration\n  googleApiKey: process.env.GOOGLE_API_KEY,      // Required for Google AI integration\n  aiProvider: 'google',                          // AI provider selection ('google' | 'openai')\n\n  // Notification Configuration\n  resendApiKey: process.env.RESEND_API_KEY,      // Required for email notifications\n  emailFrom: 'error-alerts@yourdomain.com',      // Sender email address\n  emailTo: 'engineering@yourdomain.com',         // Recipient email address\n});\n```\n\n### 2. Direct Error Logging Integration\n\nImplement error logging with granular control over error handling behavior:\n\n```javascript\nimport { AIErrorLogger } from 'error-lens';\n\ntry {\n  await performCriticalOperation();\n} catch (error) {\n  const logger = new AIErrorLogger();\n  await logger.logError(error, {\n    sendEmail: true,                    // Enable email notifications\n    severity: 'error',                  // Set error severity ('error' | 'warning' | 'info')\n    codeContext: 'Optional context'     // Provide additional context for AI analysis\n  });\n}\n```\n\n### 3. Higher-Order Error Boundary Pattern\n\nImplement systematic error handling across function boundaries:\n\n```javascript\nimport { withErrorLogging } from 'error-lens';\n\n// Define your business logic\nconst criticalOperation = async (params) =\u003e {\n  // Your implementation\n};\n\n// Apply error boundary with custom configuration\nconst safeCriticalOperation = withErrorLogging(criticalOperation, {\n  sendEmail: true,\n  severity: 'error',\n  metadata: {\n    component: 'PaymentProcessor',\n    priority: 'high'\n  }\n});\n\n// Execute with error handling\nawait safeCriticalOperation(operationParams);\n```\n\n## Advanced Configuration\n\n### Error Classification\n\nError Lens implements a sophisticated error classification system that automatically categorizes errors based on their type and context:\n\n- `TypeError`: Type-related runtime errors (e.g., attempting operations on incompatible types)\n- `ReferenceError`: Invalid reference access (e.g., accessing undefined variables)\n- `SyntaxError`: Code parsing failures (e.g., invalid JavaScript syntax)\n- `RangeError`: Out-of-bounds numerical operations (e.g., invalid array lengths)\n- `URIError`: URI encoding/decoding errors (e.g., malformed URI components)\n- `EvalError`: Errors occurring in eval() function execution\n- `NetworkError`: Communication failures (e.g., failed API requests, connection issues)\n- `AggregateError`: Multiple errors wrapped in a single error object\n- `InternalError`: JavaScript engine internal errors\n- `WebAssemblyError`: Errors in WebAssembly operations\n- `AbortError`: Operation cancellation errors (e.g., aborted fetch requests)\n- `TimeoutError`: Operation timeout errors (e.g., exceeded time limits)\n- `SecurityError`: Security violation errors (e.g., cross-origin violations)\n- `ValidationError`: Data validation failures (e.g., invalid input format)\n- `DatabaseError`: Database operation failures (e.g., connection errors, query failures)\n\nEach error category is color-coded in the console output for quick identification. Unknown error types are automatically categorized as 'Unknown Error' for comprehensive error tracking.\n\n### AI Analysis Pipeline\n\nThe AI analysis pipeline provides multi-faceted error insights:\n\n1. **Error Context Analysis**: Evaluates the error in the context of your codebase\n2. **Root Cause Identification**: Determines the underlying cause of the error\n3. **Solution Recommendations**: Provides actionable fix suggestions\n4. **Prevention Strategies**: Offers long-term mitigation strategies\n\n## License\n\nMIT License - See LICENSE file for details.\n\n---\n\n*Error Lens is designed for development teams that require sophisticated error handling capabilities with AI-powered insights. While powerful, it should be integrated thoughtfully into your error handling strategy.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsrijit%2Ferror-lens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsrijit%2Ferror-lens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsrijit%2Ferror-lens/lists"}