Skip to content

feat(js/frontend): add error tracking#814

Merged
nikitayutanov merged 3 commits intomainfrom
ny-sentry
Feb 27, 2026
Merged

feat(js/frontend): add error tracking#814
nikitayutanov merged 3 commits intomainfrom
ny-sentry

Conversation

@nikitayutanov
Copy link
Member

No description provided.

Copy link
Contributor

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

Adds Sentry-based error tracking to the frontend, including global initialization, a Sentry-backed error boundary, and explicit exception reporting in key user flows. This integrates with the existing Vite env configuration and deploy pipeline so Sentry can be enabled via VITE_SENTRY_DSN.

Changes:

  • Add @sentry/react dependency and initialize Sentry (with Replay integration) when VITE_SENTRY_DSN is present.
  • Replace the custom React error boundary with Sentry’s ErrorBoundary.
  • Capture exceptions in several feature flows (swap, token tracker, faucet, network switching) and wire DSN through Docker/GitHub Actions env.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
yarn.lock Locks new Sentry dependency tree.
js/frontend/package.json Adds @sentry/react dependency.
js/frontend/src/main.tsx Initializes Sentry using SENTRY_DSN and enables Replay integration.
js/frontend/src/components/layout/error-boundary/error-boundary.tsx Swaps custom boundary for Sentry ErrorBoundary with a fallback UI.
js/frontend/src/features/token-tracker/components/tokens-card/tokens-card.tsx Reports burn/convert failures to Sentry.
js/frontend/src/features/swap/hooks/use-swap-form.ts Reports swap submission errors to Sentry.
js/frontend/src/features/swap/components/relay-tx-button/relay-tx-button.tsx Reports manual relay failures to Sentry (Vara→Eth path).
js/frontend/src/features/swap/components/pay-vara-fee-button/pay-vara-fee-button.tsx Reports fee payment failures to Sentry.
js/frontend/src/features/faucet/components/get-balance-button/get-balance-button.tsx Reports faucet request + Turnstile verification errors to Sentry.
js/frontend/src/context/network-type/provider.tsx Reports network switch failures to Sentry.
js/frontend/src/consts/env.ts Adds SENTRY_DSN sourced from VITE_SENTRY_DSN.
js/frontend/src/consts/index.ts Re-exports SENTRY_DSN.
js/frontend/Dockerfile Adds VITE_SENTRY_DSN build arg/env propagation.
js/frontend/.env.example Documents VITE_SENTRY_DSN.
.github/workflows/deploy-frontend.yml Passes VITE_SENTRY_DSN secret as a Docker build-arg.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nikitayutanov nikitayutanov merged commit 32052e5 into main Feb 27, 2026
14 checks passed
@nikitayutanov nikitayutanov deleted the ny-sentry branch February 27, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants