-
Notifications
You must be signed in to change notification settings - Fork 3.2k
improvement: remove Sentry #1435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR removes Sentry error tracking from the application while maintaining the existing custom telemetry and OpenTelemetry systems. The main changes include removing the @sentry/nextjs dependency and cleaning up Sentry integration code from the global error handler.
Key changes:
- Removed Sentry error capture from
global-error.tsx- now only renders NextError component - Removed
@sentry/nextjsdependency frompackage.json - Custom telemetry system in
instrumentation-client.tsremains unchanged and functional - OpenTelemetry server-side instrumentation in
instrumentation-node.tsis unaffected - Added
traceroot-sdk-tsdependency, suggesting a replacement tracing solution
Issues found:
- Environment variable definitions for Sentry still exist in
lib/env.tsand should be removed to complete the cleanup
Confidence Score: 4/5
- This PR is mostly safe to merge with minor cleanup needed
- Score reflects clean removal of Sentry integration with minimal impact, but incomplete cleanup of environment variables prevents a perfect score
- Pay attention to apps/sim/lib/env.ts to complete Sentry environment variable cleanup
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/sim/app/global-error.tsx | 5/5 | Removed Sentry error reporting from global error handler, now only renders NextError component |
| apps/sim/package.json | 4/5 | Sentry packages should be removed from dependencies to complete the removal |
| apps/sim/lib/env.ts | 3/5 | Contains leftover Sentry environment variable definitions that should be removed |
Sequence Diagram
sequenceDiagram
participant App as Next.js App
participant GE as Global Error Handler
participant S as Sentry (REMOVED)
participant T as Custom Telemetry
participant OT as OpenTelemetry
Note over App, OT: Before: Error Handling with Sentry
App->>GE: Error occurs
GE->>S: captureException(error)
S-->>External: Send to Sentry service
GE->>App: Render NextError component
Note over App, OT: After: Error Handling without Sentry
App->>GE: Error occurs
GE->>App: Render NextError component directly
Note over App, OT: Telemetry continues unchanged
App->>T: Client-side events
T-->>API: Send to /api/telemetry
App->>OT: Server-side traces
OT-->>External: Send to OpenTelemetry endpoint
5 files reviewed, 2 comments
d9f9acf to
d098108
Compare
d098108 to
18e1da8
Compare
Summary
Removed Sentry dependency, reduce bundle and package size significantly
Type of Change
Testing
Tested build manually
Checklist