[Enhancement] Error monitoring uses console.error only — no Sentry or structured error tracking#790
Open
Menjay7 wants to merge 4 commits into
Open
[Enhancement] Error monitoring uses console.error only — no Sentry or structured error tracking#790Menjay7 wants to merge 4 commits into
Menjay7 wants to merge 4 commits into
Conversation
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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