Skip to content

Comments

chore(sc-65330): Improve error reporting for apps by reporting to Sentry#41

Merged
AFOJ merged 4 commits intomainfrom
chore/sc-65330/improve-error-reporting-for-apps-sentry
Jun 16, 2025
Merged

chore(sc-65330): Improve error reporting for apps by reporting to Sentry#41
AFOJ merged 4 commits intomainfrom
chore/sc-65330/improve-error-reporting-for-apps-sentry

Conversation

@HappyPaul55
Copy link
Contributor

This PR improves error reporting for apps by integrating Sentry. It includes the necessary configurations and updates to the main.tsx file to handle errors effectively.

Copilot AI review requested due to automatic review settings May 28, 2025 11:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates Sentry for enhanced error reporting by adding build-time plugins, runtime initialization, and CI configuration updates.

  • Adds the Sentry Vite plugin and sourcemap support in vite.config.ts
  • Initializes Sentry at runtime via a new instrument.ts script and imports it in main.tsx
  • Updates CI workflow to inject Sentry secrets and disable reporting on non-tag builds
  • Adds Sentry packages and removes the react-error-boundary dependency

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vite.config.ts Configure sentryVitePlugin conditionally and enable sourcemaps
src/main.tsx Import Sentry and the instrumentation script
src/instrument.ts Initialize Sentry based on URL parameters
package.json Add @sentry/react and @sentry/vite-plugin; remove error boundary dep
.github/workflows/subworkflow-build.yml Pass Sentry env vars to CI and adjust build logic
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

package.json:28

  • The react-error-boundary dependency was removed but no replacement boundary is implemented; verify that any existing error boundary logic is replaced to prevent runtime issues.
"react-error-boundary": "^4.1.2",

src/main.tsx:1

  • [nitpick] Consider wrapping the <App /> component in a Sentry.ErrorBoundary or providing a custom fallback UI to ensure UI errors are properly captured and communicated.
import * as Sentry from '@sentry/react';

@github-actions
Copy link

@AFOJ AFOJ merged commit 9a8d50d into main Jun 16, 2025
5 checks passed
@AFOJ AFOJ deleted the chore/sc-65330/improve-error-reporting-for-apps-sentry branch June 16, 2025 16:49
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.

2 participants