Skip to content

Conversation

@emir-karabeg
Copy link
Collaborator

@emir-karabeg emir-karabeg commented Sep 24, 2025

Summary

Removed Sentry dependency, reduce bundle and package size significantly

Type of Change

  • Other: Performance

Testing

Tested build manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Sep 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Sep 24, 2025 6:04pm
sim Ready Ready Preview Comment Sep 24, 2025 6:04pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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/nextjs dependency from package.json
  • Custom telemetry system in instrumentation-client.ts remains unchanged and functional
  • OpenTelemetry server-side instrumentation in instrumentation-node.ts is unaffected
  • Added traceroot-sdk-ts dependency, suggesting a replacement tracing solution

Issues found:

  • Environment variable definitions for Sentry still exist in lib/env.ts and 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
Loading

5 files reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

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.

3 participants