feat: add Core Web Vitals reporting to PostHog

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-18 02:41:43 +00:00
parent b1d1aef702
commit 9b3b82882e
2 changed files with 39 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import { createRoot } from 'react-dom/client'
import { reactErrorHandler } from '@sentry/react'
import { HelmetProvider } from 'react-helmet-async'
import { PostHogProvider } from '@posthog/react'
import { initWebVitals } from './lib/webVitals'
import { Toaster } from 'sonner'
import './index.css'
import App from './App'
@@ -22,6 +23,9 @@ if (posthogKey) {
})
}
// Start Web Vitals reporting to PostHog
initWebVitals()
createRoot(document.getElementById('root')!, {
onUncaughtError: reactErrorHandler(),
onCaughtError: reactErrorHandler(),