Skip to content

chore: remove Sentry - #12438

Merged
guanbinrui merged 1 commit into
developfrom
chore/remove-sentry
Sep 5, 2026
Merged

chore: remove Sentry#12438
guanbinrui merged 1 commit into
developfrom
chore/remove-sentry

Conversation

@guanbinrui

Copy link
Copy Markdown
Member

Summary

Removes Sentry error/performance monitoring entirely, keeping Mixpanel analytics fully intact.

  • Deletes packages/sentry (the @sentry/browser bundle injected as a content script/service-worker script) and its build task (packages/scripts/src/projects/sentry.ts).
  • Deletes the Sentry telemetry provider (web3-telemetry/src/providers/Sentry.ts) and the Sentry-only fetch-transaction tracer (captureFetchTransaction.ts); TelemetryAPI.captureException becomes a no-op since Sentry was its only backing provider (3 call sites left as-is, now harmlessly calling a no-op).
  • Bug fix found along the way: MixpanelAPI.captureEvent was incorrectly gated on the sentry_enabled/sentry_event_enabled flags instead of its own dedicated mixpanel_enabled/mixpanel_event_enabled flags (both default to the same isProd value today, so this is not a behavior change — just removes an accidental coupling to Sentry's flags that would otherwise have broken Mixpanel once those flags were deleted).
  • Removes all 7 sentry_* feature flags, the MASK_SENTRY/MASK_SENTRY_DSN env vars and their webpack DefinePlugin injection, the sentry.js/sentry-patch.js content-script injection (both the dynamic contentScriptList and the MV3 service worker's importScripts), the @sentry/browser no-restricted-imports eslint rule, and the CI "Create Sentry release" step (including its now-unnecessary git-worktreeconfig workaround) and MASK_SENTRY* secrets from compile.yml.

Test plan

  • tsc -b --force clean (0 errors) across the whole monorepo.
  • eslint clean on all touched files.
  • knip clean — no orphaned files/exports left behind.
  • Repo-wide grep sweep for sentry/@sentry/MASK_SENTRY*/SENTRY_* returns zero real hits (only unrelated phishing-domain blacklist entries that coincidentally contain "sentry" as a substring).
  • Full production build (pnpm run build) — verifying now, will confirm build output contains no sentry.js/sentry-patch.js.
  • Manual browser QA (not done here): load the built extension and confirm no console errors from the removed Sentry init, and that Mixpanel event tracking still fires normally.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ly4aKgVW1wnPu2LfzTQuJi

Removes Sentry error/performance monitoring entirely, keeping Mixpanel
analytics intact.

- Deletes packages/sentry (the @sentry/browser bundle injected as a
  content script) and its build task (packages/scripts/src/projects/sentry.ts).
- Deletes the Sentry telemetry provider (web3-telemetry/src/providers/Sentry.ts)
  and the Sentry-only fetch-transaction tracer (captureFetchTransaction.ts);
  TelemetryAPI.captureException becomes a no-op since Sentry was its only
  backing provider.
- Fixes MixpanelAPI.captureEvent, which was incorrectly gated on the
  sentry_enabled/sentry_event_enabled flags instead of its own
  mixpanel_enabled/mixpanel_event_enabled flags (same isProd default,
  so no behavior change — just no longer coupled to Sentry's flags).
- Removes all sentry_* flags, the MASK_SENTRY/MASK_SENTRY_DSN env vars
  and their webpack DefinePlugin injection, the sentry.js/sentry-patch.js
  content-script injection (both the dynamic list and the MV3 service
  worker's importScripts), the @sentry/browser no-restricted-imports
  eslint rule, and the CI "Create Sentry release" step (including its
  now-unnecessary git-worktreeconfig workaround) and MASK_SENTRY* secrets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ly4aKgVW1wnPu2LfzTQuJi
@guanbinrui
guanbinrui merged commit 8086c3c into develop Sep 5, 2026
14 of 15 checks passed
@guanbinrui
guanbinrui deleted the chore/remove-sentry branch September 5, 2026 16:04
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.

1 participant