AletheiaFact / AletheiaFact/aletheia

Enhancement: Investigate and Implement Error Monitoring Solution in Production

Abierto
#2,078 0 comentarios 0 reacciones 1 asignado Reclamado por @LuizFNJ Ver en GitHub
enhancement
Lenguaje dominante
TypeScript
Estrellas
55
Forks
20
Merge medio
2 d 6 h
PR fusionados (30 d)
2

Descripción

## Background Information

Currently, critical runtime error handling in both the frontend and backend primarily uses `console.error()`. In production environments, this prevents proactive error visibility, as logs are confined to the user's browser console.

The absence of a centralized system prevents the tracking, aggregation, notification, and prioritization of bugs that impact the user experience.

## Steps to Reproduce

The problem is not reproducible; rather, it's an architectural failure in observability:

1. A JavaScript error/Exception occurs on the client or server.
2. The exception is caught, and `console.error(e)` is called.
3. The error is not reported to any centralized system, making real-time tracking, aggregation, and alerting impossible.

## How

The objective is to integrate an open-source error monitoring solution (e.g., GlitchTip or self-hosted Sentry) and refactor our code to utilize it.

### Sub-tasks

1. **Investigation & Selection:** Evaluate and select the open-source monitoring solution that best integrates with our infrastructure and tech stack.
2. **Infra Setup:** Configure and provision the monitoring tool instance in our environment (whether via SaaS or self-hosted).
3. **Logger Implementation:** Create a logging abstraction layer (`LoggerService`) that routes errors based on the environment:
* `development`: Logs to `console.error` (local).
* `production`: Sends to the monitoring service.
4. **Code Refactoring:** Replace all critical calls to `console.error(e)` with `LoggerService.trackError(e, context)`.
5. **Alert Configuration:** Set up basic alerts (Slack/Email) to notify the team about new critical errors or error spikes.

## Expected Behavior

Production code will no longer rely solely on `console.error`. When an error occurs:

* The exception will be captured with the complete context (app version, user, stack trace).
* The error will be sent to a centralized dashboard.
* Errors will be aggregated by frequency and type.
* The team will be proactively notified about critical issues.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.