feat(monitoring): single-source PostHog Error Tracking (drop Sentry) - #4118
Conversation
Remove @sentry/vue SDK and all Sentry integration code. PostHog Error Tracking (via $exception events, already wired in posthog.js) becomes the sole error capture path, gated on analytics.posthog.errorTracking. - Delete src/lib/plugins/sentry.js + tests - Drop @sentry/vue from package.json; regen lockfile - errorTracker.js: drop Sentry fan-out, PostHog-only path remains - plugins/index.js: remove sentry from registration object - main.js: drop plugins.sentry install call; update comments - development.config.js: drop analytics.sentry section; flip analytics.posthog.errorTracking default to true - Regenerate src/config/index.js via generateConfig - Tests: drop Sentry fan-out tests, keep PostHog + isolation + normalization Wave 2 note (downstream /update-project): downstream configs that deep-merged analytics.sentry from devkit defaults may need an explicit analytics.sentry: null override to clean the stale shadow key (cf deepMerge limitation — cannot remove keys, only override with null). See feedback_config_deepmerge.md.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR removes Sentry error tracking integration entirely and consolidates error tracking to PostHog only. Changes span dependencies, configuration, core implementation, plugin infrastructure, app initialization, and test coverage. All Sentry imports, configuration, plugin code, and registrations are eliminated. ChangesSentry Removal & PostHog Consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4118 +/- ##
==========================================
- Coverage 99.54% 99.54% -0.01%
==========================================
Files 32 31 -1
Lines 1105 1089 -16
Branches 311 302 -9
==========================================
- Hits 1100 1084 -16
Misses 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/helpers/errorTracker.js`:
- Around line 19-20: Update the JSDoc for the PostHog error tracker to reflect
the actual enablement logic: say it is active when config.analytics.posthog.key
is set AND config.analytics.posthog.errorTracking is either the boolean true or
the string 'true' (matching the runtime check in errorTracker.js); reference the
config keys config.analytics.posthog.key and
config.analytics.posthog.errorTracking in the comment and remove the incorrect
assertion that only boolean true enables it.
In `@src/lib/plugins/tests/index.unit.tests.js`:
- Line 10: Test's expectedPlugins array is missing the i18n entry, so update the
unit test that defines expectedPlugins (the const expectedPlugins = [...] in
src/lib/plugins/tests/index.unit.tests.js) to include 'i18n' alongside the other
plugin names; this ensures the export contract asserted by the test matches what
src/main.js consumes (plugins.i18n) and prevents runtime failures.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: c0ab7976-2d8c-425d-b6b7-afdd3f27bb5a
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (9)
package.jsonsrc/config/defaults/development.config.jssrc/lib/helpers/errorTracker.jssrc/lib/helpers/tests/errorTracker.unit.tests.jssrc/lib/plugins/index.jssrc/lib/plugins/sentry.jssrc/lib/plugins/tests/index.unit.tests.jssrc/lib/plugins/tests/sentry.unit.tests.jssrc/main.js
💤 Files with no reviewable changes (4)
- package.json
- src/lib/plugins/index.js
- src/lib/plugins/tests/sentry.unit.tests.js
- src/lib/plugins/sentry.js
There was a problem hiding this comment.
Pull request overview
Removes the Sentry integration and consolidates client-side exception capture into a PostHog Error Tracking–only path (via $exception events), aligning the monitoring stack with PostHog as the single source of truth.
Changes:
- Removed Sentry plugin + tests, unregistered the plugin, and dropped
@sentry/vuefrom dependencies. - Simplified
captureExceptionto PostHog-only behavior (still gated byanalytics.posthog.errorTracking === true/'true'). - Updated configs/tests to reflect the PostHog-only capture path and enabled PostHog error tracking by default in development config (while still requiring a key to actually send).
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.js | Removes Sentry plugin registration and keeps global error handlers wired to captureException (PostHog-only). |
| src/lib/plugins/tests/sentry.unit.tests.js | Deletes Sentry plugin unit tests. |
| src/lib/plugins/tests/index.unit.tests.js | Removes sentry from the expected plugin export list. |
| src/lib/plugins/sentry.js | Deletes the Sentry Vue plugin implementation. |
| src/lib/plugins/index.js | Stops exporting the removed Sentry plugin. |
| src/lib/helpers/tests/errorTracker.unit.tests.js | Removes Sentry fan-out tests; keeps PostHog path + failure isolation + normalization coverage. |
| src/lib/helpers/errorTracker.js | Removes Sentry fan-out and documents PostHog-only exception capture behavior. |
| src/config/defaults/development.config.js | Removes analytics.sentry defaults and enables PostHog error tracking by default (still gated by key). |
| package.json | Drops @sentry/vue dependency. |
| package-lock.json | Regenerates lockfile to remove Sentry packages. |
| * Active when `config.analytics.posthog.key` is set AND | ||
| * `config.analytics.posthog.errorTracking === true`. | ||
| * | ||
| * Silent no-op when neither tracker is configured. | ||
| * Silent no-op when PostHog is not configured or errorTracking is not opted-in. |
There was a problem hiding this comment.
Fixed in follow-up commit — JSDoc now correctly states 'true or "true"' to match isEnabled() semantics.
| * Never throws — tracker errors must never break the calling code. | ||
| * | ||
| * @param {Error} err - Error to capture | ||
| * @param {Object} [ctx] - Optional extra context attached to the event | ||
| * @returns {void} |
There was a problem hiding this comment.
Fixed — @PARAM type updated to {unknown} with a normalization note for callers and tooling.
- errorTracker.js JSDoc: clarify errorTracking accepts boolean true or string 'true' (Docker ARG); update @PARAM err to {unknown} with note on non-Error normalization - plugins/tests/index.unit.tests.js: add i18n to expectedPlugins (was already exported, just missing from the contract test)
All 4 actionable comments addressed in follow-up commit (JSDoc corrections + i18n added to plugin contract test).
# [2.1.0](v2.0.0...v2.1.0) (2026-06-01) ### Bug Fixes * **billing:** 4 pricing page bugs (signed-in features, hero bg, truncation, guest CTA) ([#4123](#4123)) ([bd399bd](bd399bd)) * **billing:** add aria-expanded + touch support to BillingComputeGauge components ([#4181](#4181)) ([7e7fa97](7e7fa97)) * **billing:** billing UX hardening — 5 reliability fixes ([#4079](#4079)) ([dd62b3d](dd62b3d)), closes [#4078](#4078) * **billing:** canonical FA6 icons + meterError lifecycle + reject URL credentials ([#4082](#4082)) ([be16045](be16045)), closes [#4081](#4081) * **billing:** clear intentId on Stripe cancel-redirect ([#4085](#4085)) ([11be9ab](11be9ab)) * **billing:** drop empty overage aria-live div + add fr overDetail key ([#4142](#4142)) ([10e5d81](10e5d81)) * **billing:** i18n migration + Intl.NumberFormat USD (audit Codex P1) ([#4069](#4069)) ([3d3a4f6](3d3a4f6)) * **billing:** mega vue hardening v3 — UX + design + a11y + V4 ([#4063](#4063)) ([802cbc4](802cbc4)) * **billing:** send {} body on portal POST to satisfy Zod PortalRequest schema ([#4137](#4137)) ([bf6b9c8](bf6b9c8)) * **billing:** send intentId UUID to close extras double-charge window ([#4084](#4084)) ([3e27c4c](3e27c4c)) * **billing:** subscription state safety + webhook lag polling (audit Codex P1) ([#4068](#4068)) ([328700b](328700b)) * **billing:** surface meterError + remove dead 409 dialog from subscriptions ([#4081](#4081)) ([61f5d53](61f5d53)) * **billing:** V5 polish — F5 polling recovery + visibility refetch + i18n residual + locale null-guard ([#4070](#4070)) ([4908adb](4908adb)) * **billing:** V6 polish — sessionStorage guard + locale BCP47 + i18n plural + NaN guard ([#4076](#4076)) ([2ad018c](2ad018c)) * **build:** drop ARG defaults for analytics_* + filter empty env vars ([#4112](#4112)) ([afd336e](afd336e)), closes [Vue#4110](https://github.com/Vue/issues/4110) [#4110](#4110) * **build:** restore Layer 5 empty-string env override (revert [#4112](#4112) part 2) ([c9aa9e6](c9aa9e6)), closes [Vue#4110](https://github.com/Vue/issues/4110) [comes-io/trawl_vue#880](https://github.com/comes-io/trawl_vue/issues/880) [Vue#4110](https://github.com/Vue/issues/4110) * **core:** pin CorePageHeader to content size in flex-column contexts ([#4210](#4210)) ([e182512](e182512)), closes [#4202](#4202) * **layout:** route /pricing outside app shell — no drawer offset on signed-in ([#4124](#4124)) ([d862fbb](d862fbb)) * **legal:** cookie banner UA-detection + appName fallback to app.title ([#4113](#4113)) ([04cc70a](04cc70a)), closes [trawl_vue#876](https://github.com/trawl_vue/issues/876) [#4109](#4109) * **legal:** cookie consent + footer polish (5 QA bugs) ([#4098](#4098)) ([a9bf0a3](a9bf0a3)) * **legal:** gate cookie banner on isMounted to prevent prerender hydration double-render ([#4109](#4109)) ([3198e48](3198e48)), closes [#app](https://github.com/pierreb-devkit/Vue/issues/app) * **router:** redirect authenticated users to config.sign.route instead of hardcoded '/' ([#4088](#4088)) ([ca9094e](ca9094e)), closes [#4083](#4083) * **tasks:** propagate store errors so views gate navigation on success ([#4221](#4221)) ([b029d39](b029d39)), closes [#4218](#4218) * **ui:** chrome convergence — restore section title + surface backgrounds + homogeneous gutter ([#4188](#4188)) ([1e5fdf1](1e5fdf1)) * **users:** re-apply route tab when serverConfig.billing arrives async ([#4138](#4138)) ([87cc7b2](87cc7b2)) * **users:** refetch billing subscription on auth state change ([#4125](#4125)) ([5a3425a](5a3425a)) ### Features * **admin:** invitations management tab ([#4217](#4217)) ([61ad86c](61ad86c)), closes [invitedBy/#actions](https://github.com/pierreb-devkit/Vue/issues/actions) * **analytics:** add identify and reset helpers, wire auth store ([#4104](#4104)) ([c4d8b87](c4d8b87)) * **auth:** invite-gated signup UI ([#4212](#4212)) ([d17a841](d17a841)) * **billing:** add 'Manage subscription' footer link in meterDrawer ([#4056](#4056)) ([#4057](#4057)) ([7d494af](7d494af)) * **billing:** align packs.component on BillingCardComponent (V4 unified schema) ([#4147](#4147)) ([7f5dd41](7f5dd41)) * **billing:** combined pool gauge + linear breakdown bars + alerts cleanup ([f5034b1](f5034b1)) * **billing:** config-driven static-content resolver (no file replace) ([e95d944](e95d944)) * **billing:** expose netRemainingRaw + overage in useMeter for negative quota display ([#4061](#4061)) ([111e64b](111e64b)), closes [#4060](#4060) * **billing:** meter gauges display % primary, compute units in overflow tooltip ([#4139](#4139)) ([50498ba](50498ba)) * **billing:** meter UX refonte — drop drawer + subscriptions tab ([#4059](#4059)) ([891b5ae](891b5ae)), closes [#subscriptions](https://github.com/pierreb-devkit/Vue/issues/subscriptions) [#1](#1) [#2](#2) [#3](#3) [#4](#4) * **billing:** post-grant upgrade prompt variant for depleted signupGrant ([#4128](#4128)) ([0ae8558](0ae8558)) * **billing:** pricing page redesign — multi-mode + auto-savings + sectioned features + FAQ ([#4102](#4102)) ([2c83ab6](2c83ab6)) * **billing:** pricingCard Free CTA — 'Sign up' for guests, route to /signup ([#4106](#4106)) ([cc92ac8](cc92ac8)) * **billing:** redesign Subscriptions view to match user-tabs aesthetic ([#4127](#4127)) ([15fd466](15fd466)) * **billing:** relocate billing under Organization settings ([#4175](#4175)) ([1f36137](1f36137)) * **billing:** sidenav compute gauge above sign-out row (meter mode) ([#4126](#4126)) ([fe1497f](fe1497f)) * **billing:** sidenav compute gauge redesign — button-shape above sign-out row ([#4140](#4140)) ([9d3a090](9d3a090)) * **billing:** sidenav compute gauge revamp — v-progress-circular + v-tooltip ([#4144](#4144)) ([5d60f1b](5d60f1b)), closes [#prepend](https://github.com/pierreb-devkit/Vue/issues/prepend) * **billing:** subscriptions view 2-col layout — drop dup bar, CTA to /pricing#units ([#4141](#4141)) ([b7ef516](b7ef516)), closes [pricing#units](https://github.com/pricing/issues/units) * **billing:** unified BillingCardComponent + annual toggle disabled state ([#4146](#4146)) ([474bb11](474bb11)) * **billing:** unified BillingCardComponent + annual toggle disabled state ([#4149](#4149)) ([d1403ff](d1403ff)) * **billing:** v4 hardening + Phase 3 polish — equivalences chips + UX gaps + a11y ([#4066](#4066)) ([dd40b2a](dd40b2a)) * **billing:** wire netRemainingRaw + overage into devkit components ([#4062](#4062)) ([61d6897](61d6897)), closes [#4061](#4061) * **core:** reusable PageTabs component + Account view refactor ([#4183](#4183)) ([dc2504a](dc2504a)) * **core:** unified logo+title lockup in header and sidenav ([#4086](#4086)) ([ec457db](ec457db)), closes [#4083](#4083) * **feature:** read ERRORS.md in Phase 0 before coding ([#4089](#4089)) ([ddf8f60](ddf8f60)) * **legal:** Add legal module + cookie consent (RGPD) ([#4097](#4097)) ([595e6c4](595e6c4)), closes [#3204116570](https://github.com/pierreb-devkit/Vue/issues/3204116570) [#3204116650](https://github.com/pierreb-devkit/Vue/issues/3204116650) [#1](#1) [#19](#19) [#18](#18) [#13](#13) [#11](#11) [#18](#18) [#3](#3) [#10](#10) [#12](#12) [#14](#14) [#15](#15) [#17](#17) [#20](#20) [#4](#4) [#5](#5) [#6](#6) [#7](#7) [#8](#8) [#9](#9) [#16](#16) [#3](#3) [#16](#16) [#22](#22) * **legal:** liquid glass cookie banner — Vuetify-only with friendlier copy ([#4115](#4115)) ([3d74789](3d74789)), closes [#4114](#4114) * **monitoring:** single-source PostHog Error Tracking (drop Sentry) ([#4118](#4118)) ([82dfca6](82dfca6)) * **organizations:** add Organization tab + rename General route to tab-addressable ([#4184](#4184)) ([fdfbf0b](fdfbf0b)) * **organizations:** soft suggestedJoin onboarding banner + recovery-screen copy ([#4176](#4176)) ([25a3ceb](25a3ceb)) * **seo:** enrich seoInjectPlugin — multi-schemas + rich SoftwareApplication + themeColor ([#4092](#4092)) ([#4111](#4111)) ([7f8bd09](7f8bd09)) * **skill/feature:** add Phase 0.0 issue claim-on-start ([#4117](#4117)) ([a582430](a582430)), closes [pierreb-projects/infra#28](https://github.com/pierreb-projects/infra/issues/28) * **skills/update-stack:** block on undeclared drift vs upstream ([#4228](#4228)) ([ab8ee68](ab8ee68)), closes [#4227](#4227) * **users:** subs full-width + delete account danger zone + halo full-bleed fix ([#4143](#4143)) ([981f073](981f073))
Summary
src/lib/plugins/sentry.js+src/lib/plugins/tests/sentry.unit.tests.js— Sentry plugin fully removed@sentry/vuefrompackage.json; lockfile regeneratedsrc/lib/helpers/errorTracker.js— drop Sentry fan-out branch, PostHog-only path via$exceptionevents remains (gated onanalytics.posthog.errorTracking === true)src/lib/plugins/index.jsandsrc/main.jssrc/config/defaults/development.config.js— dropanalytics.sentrysection, flipanalytics.posthog.errorTrackingdefault totrue;src/config/index.jsregenerated viagenerateConfigerrorTracker.unit.tests.jsupdated (Sentry fan-out tests removed, PostHog path + failure isolation + non-Error normalization kept);plugins/tests/index.unit.tests.jsupdated (sentry removed from expected plugins list)Rationale
PostHog Error Tracking GA supports full stack traces + source maps via
@posthog/cli, native session-replay link (→ debug Vue UX bugs in 1 click), and free 100k exceptions/mo — sufficient for pre-PMF scale. Maintaining dual Sentry + PostHog adds +1 SaaS account, +1 SDK, +1 K8s secret, +1 CI sourcemaps step, and cross-tool funnel joins for no material gain at current scale. Sentry re-entry triggers: >100k exceptions/mo, distributed tracing need, or 24/7 oncall team.Wave 2 downstream note (for
/update-projectsub-agent briefing)Downstream projects that previously deep-merged
analytics.sentryfrom devkit defaults will retain the stale shadow key afternpm run update-stack, becausedeepMergecannot remove keys — only override withnull. Each downstream*.config.jsthat has a localanalyticssection must add:See
feedback_config_deepmerge.md. Projects to check:trawl_vue,comes_vue,pierreb_vue,montaine_vue,ism_vue.Test plan
npm run lint— ESLint no issuesnpm run test:unit— 1592/1592 tests pass (99 test files)npm run test:coverage— 98.92% statements, 93.24% branches, no threshold violationsSummary by CodeRabbit