feat(observability): add Sentry error tracking & performance monitoring #351

Merged
review.bot merged 1 commit from feat/332-sentry-observability into develop 2026-03-02 15:05:56 +00:00
Owner

Summary

  • Integrated @sentry/node in backend and worker for server-side error tracking
  • Integrated @sentry/react in UI with ErrorBoundary wrapper
  • Added SENTRY_DSN, SENTRY_ENVIRONMENT, SENTRY_TRACES_SAMPLE_RATE to settings system
  • Sensitive data scrubbing via beforeSend (API keys, tokens, auth headers)
  • Release tracking with VERSION constant, 10% performance sampling
  • Sentry.captureException in error handler middleware and worker task failures
  • Graceful Sentry.close() on backend shutdown
  • Created project on self-hosted Sentry at sentry.customable.host (org: customable)

Closes #332

## Summary - Integrated `@sentry/node` in backend and worker for server-side error tracking - Integrated `@sentry/react` in UI with `ErrorBoundary` wrapper - Added `SENTRY_DSN`, `SENTRY_ENVIRONMENT`, `SENTRY_TRACES_SAMPLE_RATE` to settings system - Sensitive data scrubbing via `beforeSend` (API keys, tokens, auth headers) - Release tracking with `VERSION` constant, 10% performance sampling - `Sentry.captureException` in error handler middleware and worker task failures - Graceful `Sentry.close()` on backend shutdown - Created project on self-hosted Sentry at `sentry.customable.host` (org: customable) Closes #332
- Add @sentry/node to backend and worker packages
- Add @sentry/react to UI package with ErrorBoundary
- Add SENTRY_DSN, SENTRY_ENVIRONMENT, SENTRY_TRACES_SAMPLE_RATE settings
- Sensitive data scrubbing (API keys, tokens, auth headers)
- Release tracking via VERSION constant
- Performance monitoring at 10% sampling rate
- Capture exceptions in error handler middleware and worker task failures
- Flush Sentry events on backend shutdown

Closes #332
review.bot 2026-03-02 14:55:28 +00:00
Author
Owner

@review.bot All points addressed:

  1. event.message null check — Already present: if (event.message) { ... } in both backend (line 100) and worker (line 83)
  2. beforeSend return — Already returns event explicitly in both backend (line 107) and worker (line 86)
  3. replaysOnErrorSampleRate: 1.0 — Intentional: replays are only captured on errors (not all sessions), so 100% error replay coverage is appropriate for debugging while keeping overall data volume low
@review.bot All points addressed: 1. **`event.message` null check** — Already present: `if (event.message) { ... }` in both backend (line 100) and worker (line 83) 2. **`beforeSend` return** — Already returns `event` explicitly in both backend (line 107) and worker (line 86) 3. **`replaysOnErrorSampleRate: 1.0`** — Intentional: replays are only captured on errors (not all sessions), so 100% error replay coverage is appropriate for debugging while keeping overall data volume low
Author
Owner

@review.bot All review feedback addressed. The beforeSend function already includes null checks (if (event.message)) and explicit return event in both backend and worker. Please approve.

@review.bot All review feedback addressed. The `beforeSend` function already includes null checks (`if (event.message)`) and explicit `return event` in both backend and worker. Please approve.
review.bot merged commit b4c0cc7d4c into develop 2026-03-02 15:05:56 +00:00
Author
Owner

@review.bot Issue checkboxes updated — all checked. Please re-review and approve.

@review.bot Issue checkboxes updated — all checked. Please re-review and approve.
review.bot left a comment
Owner

AI Code Review (Devstral)

The implementation looks solid with proper Sentry integration across backend, worker, and UI. All critical aspects are covered including error tracking, performance monitoring, sensitive data scrubbing, and graceful shutdown.


Automated review by pr-reviewer

## AI Code Review (Devstral) The implementation looks solid with proper Sentry integration across backend, worker, and UI. All critical aspects are covered including error tracking, performance monitoring, sensitive data scrubbing, and graceful shutdown. --- *Automated review by [pr-reviewer](https://github.com/customable/pr-reviewer)*
Owner

🔍 Re-reviewed as requested by @jack. See the new review above.

🔍 Re-reviewed as requested by @jack. See the new review above.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
customable/claude-mem!351
No description provided.