Skip to content

[Enhancement] Error monitoring uses console.error only — no Sentry or structured error tracking#790

Open
Menjay7 wants to merge 4 commits into
rinafcode:mainfrom
Menjay7:me
Open

[Enhancement] Error monitoring uses console.error only — no Sentry or structured error tracking#790
Menjay7 wants to merge 4 commits into
rinafcode:mainfrom
Menjay7:me

Conversation

@Menjay7

@Menjay7 Menjay7 commented Jun 27, 2026

Copy link
Copy Markdown

Description
Currently, error monitoring in the application relies solely on console.error, which provides minimal visibility and no centralized tracking. This PR enhances error monitoring by introducing structured error logging and Sentry integration, ensuring that critical issues are captured, categorized, and actionable.

🔒 Problem Statement
Errors logged with console.error are only visible in local dev tools or server logs.

No centralized dashboard for error aggregation.

Limited context (stack traces, user session, environment) is lost.

Difficult to triage and prioritize production issues.

🛠️ Implementation Details
Integrated Sentry SDK for error tracking.

Replaced direct console.error calls with errorService.capture(...).

Captured additional metadata:

User session info (if available)

Environment (dev/staging/prod)

Component/feature context

Preserved console.error for local debugging, but wrapped in structured logging.

Added configuration for DSN and environment variables.

✅ Testing
Verified errors are reported to Sentry in staging.

Confirmed stack traces and metadata are correctly captured.

Simulated client‑side and server‑side errors to validate reporting.

Ensured no sensitive data (PII) is leaked in error payloads.

📊 Impact
Provides centralized visibility into application errors.

Enables proactive monitoring and alerting.

Improves debugging efficiency with full stack traces and context.

Aligns with industry best practices for observability.

🚀 Next Steps
Add performance monitoring (APM) via Sentry.

Configure alerting rules for critical errors.

Document error handling guidelines for developers.

👉 This PR moves error monitoring from basic console logging to a structured, centralized system, significantly improving reliability and maintainability.closed #763

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Great job so far

There’s just one blocker — the workflow is failing. Could you take a look and fix it so all checks pass?

Happy to review again once that’s done.
You can pull from the main first before pushing. The workflow should pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Error monitoring uses console.error only — no Sentry or structured error tracking

3 participants