Skip to content

[FIX] Remove Sentry from UIs - #1186

Merged
bbengfort merged 1 commit into
mainfrom
rmsentry
Apr 12, 2026
Merged

[FIX] Remove Sentry from UIs#1186
bbengfort merged 1 commit into
mainfrom
rmsentry

Conversation

@bbengfort

@bbengfort bbengfort commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

Scope of changes

Removes sentry from our React web UIs.

Type of change

  • bug fix
  • new feature
  • documentation
  • other (describe)

Acceptance criteria

This PR will be merged without review.

Author checklist

  • I have manually tested the change and/or added automation in the form of unit tests or integration tests
  • I have updated the dependencies list
  • I have recompiled and included new protocol buffers to reflect changes I made
  • I have added new test fixtures as needed to support added tests

Note

Medium Risk
Low code-change complexity, but it removes Sentry initialization and all Sentry-related build/env wiring, reducing production error/performance visibility and potentially affecting any workflows that relied on those env vars.

Overview
Disables Sentry across both React UIs (user + admin). The Sentry initialization modules in web/gds-user-ui and web/gds-admin-ui are reduced to a no-op/log message instead of configuring @sentry/*.

Removes Sentry configuration from build/deploy plumbing. All REACT_APP_SENTRY_* variables and build args are stripped from .env templates, Dockerfiles, docker-compose.yaml, the container build script, and GitHub Actions workflows (including staging), so UI images are no longer built with Sentry DSNs/environments.

Reviewed by Cursor Bugbot for commit 6e6510e. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Sentry packages still bundled despite removal of initialization
    • Removed Sentry dependencies and all remaining Sentry imports/usages in both UIs, replacing error boundaries with react-error-boundary and removing disabled init entrypoints so the SDK is no longer bundled.

Create PR

Or push these changes by commenting:

@cursor push 64ce0a58e1

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6e6510e. Configure here.

import { BrowserTracing } from '@sentry/tracing';

import config from './config';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sentry packages still bundled despite removal of initialization

Medium Severity

Sentry initialization is disabled but @sentry/react and @sentry/tracing remain as dependencies in both gds-admin-ui/package.json and gds-user-ui/package.json. Multiple source files still actively import and use Sentry APIs: captureException in three admin UI components, Sentry.withProfiler(App) wrapping the entire user UI app tree in App.tsx, and Sentry.ErrorBoundary in several user UI components. These are now dead code, and the ~200KB Sentry SDK is still included in the production bundles despite serving no purpose.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6e6510e. Configure here.

@bbengfort
bbengfort merged commit 6cb3e8d into main Apr 12, 2026
17 checks passed
@bbengfort
bbengfort deleted the rmsentry branch April 12, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant