Skip to content

chore(comps): remove Sentry integration - #1725

Open
carsonfarmer wants to merge 2 commits into
mainfrom
chore/remove-sentry-comps
Open

chore(comps): remove Sentry integration#1725
carsonfarmer wants to merge 2 commits into
mainfrom
chore/remove-sentry-comps

Conversation

@carsonfarmer

Copy link
Copy Markdown
Member

Summary

Removes the Sentry integration from the comps app (part of winding down Sentry since we no longer actively monitor it). Companion PRs handle the API/services and load-test packages so each can be reviewed independently.

Changes

  • Delete the Next.js instrumentation entry points: instrumentation.ts, instrumentation-client.ts (client init incl. session replay), sentry.server.config.ts, sentry.edge.config.ts
  • Delete lib/sentry-config.ts (sampling/filtering helpers) and types/sentry.ts
  • Unwrap withSentryConfig in next.config.mjs — this also removes the /monitoring tunnel route (browser events proxied through our server to dodge ad-blockers), build-time source map handling, and React component annotation, which should modestly speed up builds and shrink the client bundle
  • Delete app/global-error.tsx — it existed solely to report root-layout errors to Sentry; without it Next.js renders its equivalent default error page
  • Strip capture calls while keeping behavior:
    • lib/error-handling.ts / lib/airdrop-error-handling.ts: all error categorization and user-facing messages preserved; full error context now goes to console.error instead of Sentry
    • providers/session-provider.tsx: both capture sites already had adjacent console.error/console.warn calls with the same context, so only the Sentry calls were removed
  • Drop the @sentry/nextjs dependency and update the lockfile
  • Remove comps Sentry env vars from .env.example, apps/comps/turbo.json (NEXT_PUBLIC_SENTRY_DSN, SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT, and NEXT_RUNTIME which only the deleted instrumentation read), and root turbo.json (NEXT_PUBLIC_SENTRY_DSN, SENTRY_NAVIGATION_SAMPLE_RATE)

API/server-side Sentry env vars in root turbo.json are intentionally left for the companion API/services PR.

Trade-off to be aware of

After this merges, frontend errors are no longer aggregated anywhere — visibility is limited to Vercel runtime logs (server-side) and users' browser consoles (client-side). Session replay goes away entirely. This is the accepted trade-off since nobody is monitoring Sentry today.

Verification

  • pnpm --filter comps lint
  • pnpm turbo build --filter=comps
  • Full pre-push hook (monorepo pnpm lint && pnpm format:check && pnpm build) ✅

The Sentry SDK already no-ops when its DSN env vars are unset, so this PR is safe to deploy in any order relative to the env var cleanup below.

⚠️ Required human actions (not performed by this PR)

This PR intentionally touches code only:

  1. Vercel (comps project): delete the Sentry environment variables from all environments (Production / Preview / Development): NEXT_PUBLIC_SENTRY_DSN, SENTRY_DSN, SENTRY_ENVIRONMENT, SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT.
  2. Vercel integrations: if the Sentry marketplace integration is installed on the Vercel project/team, uninstall it — it auto-injects Sentry env vars on deploy and would silently re-add them.
  3. Sentry (recallnet org): archive or delete the competitions-app project once this is deployed. Full subscription cancellation should wait until the companion API/services and load-test PRs land.
  4. Alerting check: confirm no Slack/email alert rules or on-call runbooks point at the competitions-app Sentry project before deleting it.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
comps Ready Ready Preview, Comment Jul 29, 2026 4:23am

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

📊 Test Coverage Report

Package Lines Statements Functions Branches
apps/api 2.45% 2.45% 44.11% 51.98%
apps/comps 0.27% 0.27% 37.52% (+0.14%) 39.61% (+0.17%)
packages/conversions 100.00% 100.00% 100.00% 100.00%
packages/db 4.30% 4.30% 20.86% 37.11%
packages/rewards 100.00% 100.00% 100.00% 100.00%
packages/services 52.76% (-0.02%) 52.76% (-0.02%) 66.76% (-0.15%) 79.28% (-0.09%)
packages/staking-contracts 100.00% 100.00% 100.00% 100.00%

carsonfarmer and others added 2 commits July 28, 2026 21:11
Sentry is no longer actively monitored. Remove the Next.js
instrumentation (client, server, and edge init), session replay, the
withSentryConfig build wrapper (source map upload, /monitoring tunnel
route, React component annotation), and all capture call sites. The
user-facing error categorization and messages in error-handling.ts and
airdrop-error-handling.ts are preserved; errors are now logged to the
console instead of Sentry. global-error.tsx existed only to report to
Sentry, so it is removed in favor of the Next.js default error page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same treatment as the posthog PR: the regenerated lockfile had
re-resolved the @babel/core peer for eight surviving packages
(next, styled-jsx, styled-components, connectkit, and friends) from
7.28.0 to 7.28.4 and picked up registry deprecation metadata. Rebuild
from main's lockfile, removing only the @sentry/nextjs importer entry
and entries unreachable from the remaining importers, so every
surviving resolution is byte-identical to main. Verified with a
frozen-lockfile install and a comps build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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