Skip to content

Sentry Implementation - #2

Merged
th3hero merged 2 commits into
mainfrom
features/setup
Mar 1, 2026
Merged

Sentry Implementation#2
th3hero merged 2 commits into
mainfrom
features/setup

Conversation

@th3hero

@th3hero th3hero commented Mar 1, 2026

Copy link
Copy Markdown
Owner

This pull request introduces Sentry error monitoring and reporting throughout the application. Sentry is now initialized at startup, and critical errors, exceptions, and health check degradations are captured and sent to Sentry with relevant context and tags. The changes include configuration updates, new service methods, and integration into error handling and health check logic.

Sentry Integration

  • Added Sentry configuration to env.example and parsed it in environment.config.ts, enabling Sentry via environment variables. [1] [2] [3]
  • Installed @sentry/node as a dependency in package.json.
  • Created sentry.service.ts with initSentry, captureException, and captureMessage methods for error and message reporting, and exported these from the service index. [1] [2]

Application Startup

  • Initialized Sentry at application startup in app.ts to ensure error reporting is available from the beginning.

Error and Health Reporting

  • Enhanced error handling middleware to capture and report exceptions to Sentry, including context and tags for both custom errors and uncaught errors. [1] [2] [3] [4]
  • Updated health check controller to send a Sentry message when service status is degraded or unhealthy. [1] [2]

Process-level Error Capture

  • Added Sentry reporting for uncaught exceptions and unhandled promise rejections in index.ts to improve visibility into critical failures. [1] [2]

@th3hero
th3hero merged commit 1a339ae into main Mar 1, 2026
1 check passed
@th3hero
th3hero deleted the features/setup branch March 1, 2026 01:51
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.

1 participant